Generate Certificate
Overview
Steps
> git clone -o upstream https://github.com/egovernments/DIGIT-OSS> git clone -o upstream https://github.com/egovernments/configs> cd DIGIT-Dev
> git checkout DIGIT_DEVELOPER_GUIDE> cd configs/pdf-service/data-config
> touch digit-developer-guide.json{
"key": "btcertificate",
"DataConfigs": {
"serviceName": "rainmaker-common",
"version": "1.0.0",
"baseKeyPath": "$.BirthRegistrationApplications.*",
"entityIdPath":"$.id",
"isCommonTableBorderRequired": true,
"mappings": [
{
"mappings": [
{
"direct": [
{
"variable": "logoImage",
"url":"https://raw.githubusercontent.com/egovernments/egov-web-app/master/web/rainmaker/dev-packages/egov-ui-kit-dev/src/assets/images/pblogo.png",
"type":"image"
},
{
"variable": "applicantName",
"value": {
"path": "$.babyFirstName"
}
},
{
"variable": "applicationNo",
"value": {
"path": "$.applicationNumber"
}
},
{
"variable": "address",
"value": {
"path": "$.address.city"
}
},
{
"variable": "birthIdIssueDate",
"value": {
"path": "$.auditDetails.createdTime"
},
"type": "date"
},
{
"variable": "signedCertificateData",
"value": {
"path": "$.signedCertificate"
}
},
{
"variable": "to",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_RECEIPT_TO"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "municipal_corportaion",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_MUNICIPAL_CORPORATION"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "corporation_contact",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_LICENSE_CORPORATION_CONTACT"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "corporation_website",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_LICENSE_CORPORATION_WEBSITE"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "corporation_email",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_LICENSE_CORPORATION_EMAIL"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "application_no",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_APPLICATION_NO"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "reciept_no",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_RECIEPT_NO"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "financial_year",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_FINANCIAL_YEAR"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "trade_name",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_TRADE_NAME"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "trade_owner_name",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_TRADE_OWNER_NAME"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "trade_owner_contact",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_TRADE_OWNER_CONTACT"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "trade_address",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_TRADE_ADDRESS"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "trade_type",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_TRADE_TYPE"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "accessories_label",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_ACCESSORIES_LABEL"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "trade_license_fee",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_TRADE_LICENSE_FEE"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "license_issue_date",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_LICENSE_ISSUE_DATE"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "license_validity",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_LICENSE_VALIDITY"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "approved_by",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_APPROVED_BY"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
},
{
"variable": "commissioner",
"value": {
"path": "PDF_STATIC_LABEL_CONSOLIDATED_TLCERTIFICATE_COMMISSIONER"
},
"type": "label",
"localisation":{
"required":true,
"prefix": null,
"module":"rainmaker-common"
}
}
]
},
{
"externalAPI": [
{
"path": "http://localhost:8082/egov-mdms-service/v1/_get",
"queryParam": "moduleName=tenant&masterName=tenants&tenantId=pb&filter=%5B?(@.code=='{$.tenantId}')%5D",
"apiRequest": null,
"responseMapping":[
{
"variable":"ulb-address",
"value":"$.MdmsRes.tenant.tenants[0].address"
},
{
"variable":"corporationContact",
"value":"$.MdmsRes.tenant.tenants[0].contactNumber"
},
{
"variable":"corporationWebsite",
"value":"$.MdmsRes.tenant.tenants[0].domainUrl"
},
{
"variable":"corporationEmail",
"value":"$.MdmsRes.tenant.tenants[0].emailId"
}
]
},
{
"path": "http://localhost:8288/filestore/v1/files/url",
"queryParam": "tenantId=pb,fileStoreIds=$.tradeLicenseDetail.applicationDocuments[?(@.documentType== 'OWNERPHOTO')].fileStoreId",
"apiRequest": null,
"requesttype": "GET",
"responseMapping":[
{
"variable":"userpic",
"value":"$.fileStoreIds[0].url",
"type": "image"
}
]
},
{
"path": "http://localhost:8282/egov-workflow-v2/egov-wf/process/_search",
"queryParam": "businessIds=$.applicationNumber,history=true,tenantId=$.tenantId",
"apiRequest": null,
"responseMapping":[
{
"variable":"approvedBy",
"value":"$.ProcessInstances[?(@.action == 'APPROVE')].assigner.name"
}
]
}
]
},
{
"qrcodeConfig": [
{
"variable": "qrCode",
"value": "{{signedCertificateData}}"
}
]
}
]
}
]
}
}Deploy PDF Service
Last updated
Was this helpful?