diff --git a/data/od/ACCESSCONTROL-ACTIONS-TEST/actions-test.json b/data/od/ACCESSCONTROL-ACTIONS-TEST/actions-test.json new file mode 100644 index 0000000..d276cb4 --- /dev/null +++ b/data/od/ACCESSCONTROL-ACTIONS-TEST/actions-test.json @@ -0,0 +1,42 @@ +{ + "tenantId": "od", + "moduleName": "ACCESSCONTROL-ACTIONS-TEST", + "actions-test": [ + { + "id": 51, + "name": "Create Project", + "url": "/pms/project/v1/_create", + "parentModule": "project-management-system", + "displayName": "Create Project", + "orderNumber": 0, + "enabled": false, + "serviceCode": "project-management-system", + "code": "null", + "path": "" + }, + { + "id": 52, + "name": "Search Project", + "url": "/pms/project/v1/_search", + "parentModule": "project-management-system", + "displayName": "Search Project", + "orderNumber": 0, + "enabled": false, + "serviceCode": "project-management-system", + "code": "null", + "path": "" + }, + { + "id": 53, + "name": "Update Project", + "url": "/pms/project/v1/_update", + "parentModule": "project-management-system", + "displayName": "Update Project", + "orderNumber": 0, + "enabled": false, + "serviceCode": "project-management-system", + "code": "null", + "path": "" + } + ] +} diff --git a/data/od/ACCESSCONTROL-ROLEACTIONS/roleactions.json b/data/od/ACCESSCONTROL-ROLEACTIONS/roleactions.json new file mode 100644 index 0000000..1174462 --- /dev/null +++ b/data/od/ACCESSCONTROL-ROLEACTIONS/roleactions.json @@ -0,0 +1,30 @@ +{ + "tenantId": "od", + "moduleName": "ACCESSCONTROL-ROLEACTIONS", + "roleactions": [ + { + "rolecode": "PROJECT_CREATOR", + "actionid": 51, + "actioncode": "", + "tenantId": "od" + }, + { + "rolecode": "PROJECT_CREATOR", + "actionid": 52, + "actioncode": "", + "tenantId": "od" + }, + { + "rolecode": "PROJECT_CREATOR", + "actionid": 53, + "actioncode": "", + "tenantId": "od" + }, + { + "rolecode": "PROJECT_VIEWER", + "actionid": 52, + "actioncode": "", + "tenantId": "od" + } + ] +} diff --git a/data/od/ACCESSCONTROL-ROLES/roles.json b/data/od/ACCESSCONTROL-ROLES/roles.json new file mode 100644 index 0000000..71925f8 --- /dev/null +++ b/data/od/ACCESSCONTROL-ROLES/roles.json @@ -0,0 +1,116 @@ +{ + "tenantId": "od", + "moduleName": "ACCESSCONTROL-ROLES", + "roles": [ + { + "code": "CITIZEN", + "name": "Citizen", + "description": "Default role for citizen" + }, + { + "code": "EMPLOYEE", + "name": "Employee", + "description": "Default role for all employees" + }, + { + "code": "SUPERUSER", + "name": "SUPER USER", + "description": "SUPER USER" + }, + { + "code": "PROJECT_CREATOR", + "name": "PROJECT CREATOR", + "description": "Project Creator" + }, + { + "code": "PROJECT_VIEWER", + "name": "PROJECT VIEWER", + "description": "Project Viewer" + }, + { + "code": "ESTIMATE_CREATOR", + "name": "ESTIMATE CREATOR", + "description": "Estimate Creator" + }, + { + "code": "ESTIMATE_VERIFIER", + "name": "ESTIMATE VERIFIER", + "description": "Estimate Verifier" + }, + { + "code": "TECHNICAL_SANCTIONER", + "name": "TECHNICAL SANCTIONER", + "description": "Technical sanctioner" + }, + { + "code": "ESTIMATE_APPROVER", + "name": "ESTIMATE APPROVER", + "description": "Estimate Approver" + }, + { + "code": "WORK_ORDER_CREATOR", + "name": "WORK ORDER CREATOR", + "description": "Work Order Creator" + }, + { + "code": "WORK_ORDER_VIEWER", + "name": "WORK ORDER VIEWER", + "description": "Work Order Viewer" + }, + { + "code": "WORK_ORDER_APPROVER", + "name": "WORK ORDER APPROVER", + "description": "Work Order Approver" + }, + { + "code": "MUSTER_ROLL_VERIFIER", + "name": "MUSTER ROLL VERIFIER", + "description": "Muster Roll Verifier" + }, + { + "code": "MUSTER_ROLL_APPROVER", + "name": "MUSTER ROLL APPROVER", + "description": "Muster Roll Approver" + }, + { + "code": "MUKTA_ADMIN", + "name": "MUKTA Admin", + "description": "MUKTA Admin" + }, + { + "code": "HRMS_ADMIN", + "name": "HRMS Admin", + "description": "HRMS Admin" + }, + { + "code": "STADMIN", + "name": "State Dashboard Admin", + "description": "Dashboard Viewer" + }, + { + "code": "ORG_ADMIN", + "name": "Organization admin", + "description": "CBO Admin" + }, + { + "code": "BILL_CREATOR", + "name": "BILL_CREATOR", + "description": "Bill Creator" + }, + { + "code": "BILL_VIEWER", + "name": "BILL_VIEWER", + "description": "Bill Viewer" + }, + { + "code": "EMPLOYEE_COMMON", + "name": "Employee Common", + "description": "Common Role For all employee" + }, + { + "code": "ESTIMATE_VIEWER", + "name": "ESTIMATE VIEWER", + "description": "Estimate Viewer" + } + ] +} diff --git a/data/od/common-masters/Department.json b/data/od/common-masters/Department.json new file mode 100644 index 0000000..7798182 --- /dev/null +++ b/data/od/common-masters/Department.json @@ -0,0 +1,46 @@ +{ + "tenantId": "pg", + "moduleName": "common-masters", + "Department": [ + { + "name": "Administration", + "code": "ADM", + "active": true + }, + { + "name": "Tax", + "code": "REV", + "active": true + }, + { + "name": "Accounts", + "code": "ACC", + "active": true + }, + { + "name": "Public Health and Sanitation", + "code": "PHS", + "active": true + }, + { + "name": "Works", + "code": "WRK", + "active": true + }, + { + "name": "Town Planning", + "code": "TWP", + "active": true + }, + { + "name": "National Urban Livelihood Mission", + "code": "NULM", + "active": true + }, + { + "name": "Public Relations", + "code": "PR", + "active": true + } + ] +} diff --git a/data/od/tenant/citymodule.json b/data/od/tenant/citymodule.json new file mode 100644 index 0000000..fc4efcc --- /dev/null +++ b/data/od/tenant/citymodule.json @@ -0,0 +1,174 @@ +{ + "tenantId": "od", + "moduleName": "tenant", + "citymodule": [ + { + "module": "Mukta", + "code": "Mukta", + "active": true, + "order": 1, + "tenants": [ + { + "code": "od.jatni" + }, + { + "code": "od.dhenkanal" + } + ] + }, + { + "module": "AttendenceMgmt", + "code": "AttendenceMgmt", + "active": true, + "order": 4, + "tenants": [ + { + "code": "od.jatni" + }, + { + "code": "od.dhenkanal" + } + ] + }, + { + "module": "Contracts", + "code": "Contracts", + "active": true, + "order": 5, + "tenants": [ + { + "code": "od.jatni" + }, + { + "code": "od.dhenkanal" + } + ] + }, + { + "module": "Expenditure", + "code": "Expenditure", + "active": true, + "order": 7, + "tenants": [ + { + "code": "od.jatni" + }, + { + "code": "od.dhenkanal" + } + ] + }, + { + "module": "Engagement", + "code": "Engagement", + "active": false, + "order": 4, + "tenants": [ + { + "code": "od.jatni" + }, + { + "code": "od.dhenkanal" + } + ] + }, + { + "module": "HRMS", + "code": "HRMS", + "active": true, + "order": 2, + "tenants": [ + { + "code": "od.jatni" + }, + { + "code": "od.dhenkanal" + } + ] + }, + { + "module": "Estimate", + "code": "Estimate", + "active": true, + "order": 3, + "tenants": [ + { + "code": "od.jatni" + }, + { + "code": "od.dhenkanal" + } + ] + }, + { + "module": "Masters", + "code": "Masters", + "active": true, + "order": 6, + "tenants": [ + { + "code": "od.jatni" + }, + { + "code": "od.dhenkanal" + } + ] + }, + { + "module": "Project", + "code": "Project", + "active": true, + "order": 8, + "tenants": [ + { + "code": "od.jatni" + }, + { + "code": "od.dhenkanal" + } + ] + }, + { + "module": "Mukta", + "code": "Mukta", + "active": true, + "order": 9, + "tenants": [ + { + "code": "od.jatni" + }, + { + "code": "od.dhenkanal" + } + ] + }, + { + "module": "DSS", + "code": "DSS", + "active": true, + "order": 10, + "tenants": [ + { + "code": "od.jatni" + }, + { + "code": "od.dhenkanal" + } + ] + }, + { + "module": "Utilities", + "code": "Utilities", + "active": true, + "order": 11, + "tenants": [ + { + "code": "od.jatni" + }, + { + "code": "od.dhenkanal" + } + ] + } + ] +} diff --git a/data/od/tenant/tenants.json b/data/od/tenant/tenants.json new file mode 100644 index 0000000..4a4a0ba --- /dev/null +++ b/data/od/tenant/tenants.json @@ -0,0 +1,121 @@ +{ + "tenantId": "od", + "moduleName": "tenant", + "tenants": [ + { + "code": "od", + "name": "Odissa", + "description": "Demo", + "logoId": "https://s3.ap-south-1.amazonaws.com/works-qa-asset/pg/logo.png", + "imageId": "https://s3.ap-south-1.amazonaws.com/works-qa-asset/pg/logo.png", + "domainUrl": "www.mccitya.in", + "type": "CITY", + "twitterUrl": "https://twitter.com/search?q=%23citya", + "facebookUrl": "https://www.facebook.com/city/citya-Demo", + "emailId": "complaints.mcj@gmail.com", + "OfficeTimings": { + "Mon - Fri": "9.00 AM - 6.00 PM" + }, + "city": { + "name": "Demo", + "localName": "Demo", + "districtCode": "0", + "districtName": "Demo", + "districtTenantCode": "od.demo", + "regionName": "Demo", + "ulbGrade": "ST", + "longitude": 75.3412, + "latitude": 31.1471, + "shapeFileLocation": null, + "captcha": null, + "code": "0", + "ddrName": null + }, + "address": "5 Demo Municipal Bhawan, 3, Dakshin Marg, 35A, Sector 35A, Chandigarh, 160022", + "pincode": [], + "contactNumber": "0181-2227015", + "pdfHeader": "OD_PDF_HEADER", + "pdfContactDetails": "OD_CONTACT_DETAILS" + }, + { + "code": "od.jatni", + "name": "Jatni", + "description": "Jatni", + "logoId": "", + "imageId": "", + "domainUrl": "", + "type": "CITY", + "twitterUrl": "", + "facebookUrl": "", + "emailId": "helpdesk.sujog@odisha.gov.in", + "OfficeTimings": { + "Mon - Fri": "9.00 AM - 6.00 PM" + }, + "city": { + "name": "Jatni", + "localName": "", + "districtCode": "KH", + "districtName": "Khordha", + "districtTenantCode": "od.jatni", + "regionName": "WATCO-II", + "ulbGrade": "Municipality", + "ulbType": "Municipality", + "longitude": 85.7058693, + "latitude": 20.1703784, + "shapeFileLocation": null, + "captcha": null, + "code": "JA", + "regionCode": "", + "municipalityName": "Jatni", + "ddrName": "Khordha" + }, + "address": "Jatni Municipality", + "pincode": [ + 752050 + ], + "contactNumber": "1800 121 6833", + "pdfHeader": "OD_JATNI_PDF_HEADER", + "pdfContactDetails": "OD_JATNI_CONTACT_DETAILS" + }, + { + "code": "od.dhenkanal", + "name": "Dhenkanal", + "description": "Dhenkanal", + "logoId": "", + "imageId": "", + "domainUrl": "", + "type": "CITY", + "twitterUrl": "", + "facebookUrl": "", + "emailId": "helpdesk.sujog@odisha.gov.in", + "OfficeTimings": { + "Mon - Fri": "9.00 AM - 6.00 PM" + }, + "city": { + "name": "Dhenkanal", + "localName": "", + "districtCode": "DK", + "districtName": "Dhenkanal", + "districtTenantCode": "od.dhenkanal", + "regionName": "Angul", + "ulbGrade": "Municipality", + "ulbType": "Municipality", + "longitude": 85.5972218, + "latitude": 20.6503455, + "shapeFileLocation": null, + "captcha": null, + "code": "DL", + "regionCode": "", + "municipalityName": "", + "ddrName": "Dhenkanal" + }, + "address": "Dhenkanal Municipality", + "pincode": [ + 759001 + ], + "contactNumber": "1800 121 6833", + "pdfHeader": "OD_DHENKANAL_PDF_HEADER", + "pdfContactDetails": "OD_DHENKANAL_CONTACT_DETAILS" + } + ] +} diff --git a/data/od/works/BeneficiaryType.json b/data/od/works/BeneficiaryType.json new file mode 100644 index 0000000..a3bfd7a --- /dev/null +++ b/data/od/works/BeneficiaryType.json @@ -0,0 +1,41 @@ +{ + "tenantId": "pg", + "moduleName": "works", + "BeneficiaryType": [ + { + "name": "General", + "code": "General", + "active": true + }, + { + "name": "SC", + "code": "SC", + "active": true + }, + { + "name": "ST", + "code": "ST", + "active": true + }, + { + "name": "BC", + "code": "BC", + "active": true + }, + { + "name": "Minority", + "code": "Minority", + "active": true + }, + { + "name": "Women", + "code": "Women", + "active": true + }, + { + "name": "Children", + "code": "Children", + "active": true + } + ] +} \ No newline at end of file diff --git a/data/od/works/Category.json b/data/od/works/Category.json new file mode 100644 index 0000000..feb21cd --- /dev/null +++ b/data/od/works/Category.json @@ -0,0 +1,21 @@ +{ + "tenantId": "pg", + "moduleName": "works", + "Category": [ + { + "name": "Overhead", + "code": "OVERHEAD", + "active": true + }, + { + "name": "SOR", + "code": "SOR", + "active": true + }, + { + "name": "non-SOR", + "code": "NON-SOR", + "active": true + } + ] +} diff --git a/data/od/works/NatureOfWork.json b/data/od/works/NatureOfWork.json new file mode 100644 index 0000000..2c403bd --- /dev/null +++ b/data/od/works/NatureOfWork.json @@ -0,0 +1,16 @@ +{ + "tenantId": "pg", + "moduleName": "works", + "NatureOfWork": [ + { + "name": "Capital", + "code": "Capital", + "active": true + }, + { + "name": "Operation & Maintenance", + "code": "Operation & Maintenance", + "active": true + } + ] +} \ No newline at end of file diff --git a/data/od/works/ProjectType.json b/data/od/works/ProjectType.json new file mode 100644 index 0000000..1657a6d --- /dev/null +++ b/data/od/works/ProjectType.json @@ -0,0 +1,42 @@ +{ + "tenantId": "pg", + "moduleName": "works", + "ProjectType": [ + { + "id": 1, + "name": "Drainage and sewerage work [Except de-siltation]", + "code": "DR", + "group": "", + "beneficiary": "", + "active": true, + "projectSubType": [] + }, + { + "id": 5, + "name": "Sanitation work [Except road sweeping and drain cleaning]", + "code": "SN", + "group": "", + "beneficiary": "", + "active": true, + "projectSubType": [] + }, + { + "id": 9, + "name": "Water conservation and rain water harvesting structures", + "code": "WT", + "group": "", + "beneficiary": "", + "active": true, + "projectSubType": [] + }, + { + "id": 13, + "name": "Development and renovation of water bodies", + "code": "WB", + "group": "", + "beneficiary": "Slum", + "active": true, + "projectSubType": [] + } + ] +} diff --git a/data/od/works/TargetDemography.json b/data/od/works/TargetDemography.json new file mode 100644 index 0000000..3d69047 --- /dev/null +++ b/data/od/works/TargetDemography.json @@ -0,0 +1,38 @@ +{ + "tenantId": "od", + "moduleName": "works", + "TargetDemography": [ + { + "code": "SM", + "name": "Slum", + "description": "Slum", + "effectiveFrom": null, + "effectiveTo": null, + "active": true + }, + { + "code": "SC", + "name": "Area inhabited by SC", + "description": "Area inhabited by SC", + "effectiveFrom": null, + "effectiveTo": null, + "active": true + }, + { + "code": "ST", + "name": "Area inhabited by ST", + "description": "Area inhabited by ST", + "effectiveFrom": null, + "effectiveTo": null, + "active": true + }, + { + "code": "MN", + "name": "Area inhabited by Minorities", + "description": "Area inhabited by Minorities", + "effectiveFrom": null, + "effectiveTo": null, + "active": true + } + ] + } diff --git a/master-config.json b/master-config.json new file mode 100644 index 0000000..b93f90c --- /dev/null +++ b/master-config.json @@ -0,0 +1,125 @@ +{ + "ACCESSCONTROL-ACTIONS-TEST": { + "actions-test": { + "masterName": "actions-test", + "isStateLevel": true, + "uniqueKeys": [ + "$.id" + ] + } + }, + "ACCESSCONTROL-ROLES": { + "roles": { + "masterName": "roles", + "isStateLevel": true, + "uniqueKeys": [ + "$.code" + ] + } + }, + "ACCESSCONTROL-ROLEACTIONS": { + "roleactions": { + "masterName": "roleactions", + "uniqueKeys": [ + "$.rolecode", + "$.actionid", + "$.tenantid" + ] + } + }, + "common-masters": { + "Department": { + "masterName": "Department", + "moduleDefinition": null, + "isStateLevel": true, + "uniqueKeys": [ + "$.code", + "$.tenantId" + ] + }, + "Designation": { + "masterName": "Designation", + "moduleDefinition": null, + "isStateLevel": true, + "uniqueKeys": [ + "$.code" + ] + }, + "OwnerShipCategory": { + "masterName": "OwnerShipCategory", + "moduleDefinition": null, + "isStateLevel": true, + "uniqueKeys": [ + "$.code" + ] + } + }, + "DIGIT-UI": { + "ApiCachingSettings": { + "masterName": "ApiCachingSettings", + "isStateLevel": true, + "uniqueKeys": [] + } + }, + "tenant": { + "tenants": { + "masterName": "tenants", + "isStateLevel": true, + "moduleDefinition": null, + "uniqueKeys": [ + "$.code" + ] + }, + "citymodule": { + "masterName": "citymodule", + "isStateLevel": true, + "moduleDefinition": null, + "uniqueKeys": [ + "$.code" + ] + } + },"egov-hrms": { + "EmployeeStatus": { + "masterName": "EmployeeStatus", + "isStateLevel": true, + "uniqueKeys": [ + "$.code" + ] + }, + "EmployeeType": { + "masterName": "EmployeeType", + "isStateLevel": true, + "uniqueKeys": [ + "$.code" + ] + }, + "Degree": { + "masterName": "Degree", + "isStateLevel": true, + "uniqueKeys": [ + "$.code" + ] + }, + "Specalization": { + "masterName": "Specalization", + "isStateLevel": true, + "uniqueKeys": [ + "$.code" + ] + }, + "DeactivationReason": { + "masterName": "DeactivationReason", + "isStateLevel": true, + "uniqueKeys": [ + "$.code" + ] + }, + "EmploymentTest": { + "masterName": "EmploymentTest", + "isStateLevel": true, + "uniqueKeys": [ + "$.code" + ] + } + } +} diff --git a/test.py b/test.py new file mode 100644 index 0000000..4c87ae0 --- /dev/null +++ b/test.py @@ -0,0 +1,24 @@ +import json +from pathlib import Path +import os + +def check_file(file_path): + with open(file_path) as f: + try: + data = json.load(f) + if "tenantId" not in data: + print("tenantId missing in file - " + file_path) + if "moduleName" not in data: + print("moduleName misisng in file - " + file_path) + except Exception as ex: + print(ex) + print("JSON error in file - " + file_path) + +for root, dirs, files in os.walk("data"): + for file in files: + if file.endswith(".json"): + file_path = os.path.join(root, file) + check_file(file_path) + + +