module.exports = app => { const request = require("request"); const cors=require('cors'); const Testcontroller = require("../controllers/test.controller.js"); const Entitycontroller = require("../controllers/entity.applicant.controller.js"); const Mastercontroller = require("../controllers/master.controller.js"); const Loancontroller = require("../controllers/loan.details.controller.js"); const { logMsg } = require('../services/logger.js'); var router = require("express").Router(); // demo welcome Api /** * @swagger * /api/demo: * get: * summary: Demo Api * description: Welcome Message * responses: * 200: * description: success */ router.get("/demo", Testcontroller.Welcome); // Module Completion Status update api /** * @swagger * /api/UpdateModuleCompletionStatus: * get: * summary: Update Module Completion Status data * description: * parameters: * - in: query * name: losid * schema: * type: string * required: true * example: MW112233 * - in: query * name: module_name * schema: * type: string * required: true * example: GST * responses: * 200: * description: success */ router.get("/UpdateModuleCompletionStatus", Loancontroller.updateModuleCompletionStatus); // LoanDeatilList List Api /** * @swagger * /api/LoanDeatilList: * get: * summary: Loan Numbers Details List * description: Get loan Number Details List * parameters: * - in: query * name: losid * schema: * type: string * required: true * description: id of the loan detail Details (primart key of entity) * example: MW112233 * responses: * 200: * description: success */ router.get("/LoanDeatilList", Entitycontroller.LoanDeatilList); // entity_applicant_name list for banking module /** * @swagger * /api/entityApplicantNameList: * get: * summary: Entity & Applicant Name List for Banking module(not for this module use) * description: Get Entity Applicant Name List for losid * parameters: * - in: query * name: losid * schema: * type: string * required: true * description: Loan ID * example: MW112233 * responses: * 200: * description: success */ router.get("/entityApplicantNameList", Entitycontroller.EntityApplicantNameList); // Main ApplicantDetails for SalesPd module /** * @swagger * /api/MainApplicantDetailsList: * get: * summary: Main ApplicantDetails for SalesPd module(not for this module use) * description: Get Main ApplicantDetails * parameters: * - in: query * name: losid * schema: * type: string * required: true * description: Loan ID * example: MW112233 * responses: * 200: * description: success */ router.get("/MainApplicantDetailsList", Entitycontroller.MainApplicantDetailsList); // landingPageApi List Api /** * @swagger * /api/landingPageApi: * get: * summary: Loan Numbers Details List * description: Get loan Number Details List * responses: * 200: * description: success */ router.get("/landingPageApi", Entitycontroller.landingPageApi); // Entity Details List Api /** * @swagger * /api/entityDetailsList: * get: * summary: Entity Details List * description: Get Entity List by sending Los id (Primary key) * parameters: * - in: query * name: loan_no_id * schema: * type: integer * required: true * description: id of the Loan Details (primart key of Los_id) * example: 1 * - in: query * name: losid * schema: * type: string * required: true * description: Loan ID * example: MW112233 * responses: * 200: * description: success */ router.get("/entityDetailsList", Entitycontroller.EntityDetailsList); // Applicant Details List Api /** * @swagger * /api/applicantDetailsList: * get: * summary: Applicants Details List * description: Get Applicant List by sending Los id (Primery key) * parameters: * - in: query * name: loan_no_id * schema: * type: integer * required: true * description: id of the Loan Details (primart key of Los_id) * example: 1 * - in: query * name: losid * schema: * type: string * required: true * description: Loan ID * example: MW112233 * responses: * 200: * description: success */ router.get("/applicantDetailsList", Entitycontroller.ApplicantDetailsList); // Applicants relationship List Api /** * @swagger * /api/applicantRelationshipList: * get: * summary: Applicant Relationship List * description: Get Applicant Relationship List by sending Los id(Primery key) * parameters: * - in: query * name: loan_no_id * schema: * type: integer * required: true * description: id of the Loan Details (primart key of Los_id) * example: 1 * - in: query * name: losid * schema: * type: string * required: true * description: Loan ID * example: MW112233 * responses: * 200: * description: success */ router.get("/applicantRelationshipList", Entitycontroller.ApplicantRelationshipList); // Residence Address Details List Api /** * @swagger * /api/residenceAddressDetailsList: * get: * summary: Residence Addres sDetails List * description: Get Residence Address Details List by sending Los id(Primery key) * parameters: * - in: query * name: loan_no_id * schema: * type: integer * required: true * description: id of the Loan Details (primart key of Los_id) * example: 1 * - in: query * name: losid * schema: * type: string * required: true * description: Loan ID * example: MW112233 * responses: * 200: * description: success */ router.get("/residenceAddressDetailsList", Entitycontroller.ResidenceAddressDetailsList); // Property Ownership Income Considered Details List Api /** * @swagger * /api/propertyOwnershipList: * get: * summary: Property Ownership Income Considered List * description: Get Property Ownership Income Considered List by sending Los id(Primery key) * parameters: * - in: query * name: loan_no_id * schema: * type: integer * required: true * description: id of the Loan Details (primart key of Los_id) * example: 1 * - in: query * name: losid * schema: * type: string * required: true * description: Loan ID * example: MW112233 * responses: * 200: * description: success */ router.get("/propertyOwnershipList", Entitycontroller.PropertyOwnershipList); // Due Diligence Check Details List Api /** * @swagger * /api/dueDiligenceCheckList: * get: * summary: Due Diligence Check List * description: Get Due Diligence Checkd List by sending entity id(Primery key) * parameters: * - in: query * name: entity_id * schema: * type: integer * required: true * description: id of the entity Details (primart key of entity) * example: 1 * responses: * 200: * description: success */ router.get("/dueDiligenceCheckList", Entitycontroller.DueDiligenceCheckList); // Trade References List Details Api /** * @swagger * /api/tradeReferencesList: * get: * summary: Trade References List * description: Get Trade References List by sending entity id(Primery key) * parameters: * - in: query * name: entity_id * schema: * type: integer * required: true * description: id of the entity Details (primart key of entity) * example: 1 * responses: * 200: * description: success */ router.get("/tradeReferencesList", Entitycontroller.TradeReferencesList); // EnquiriesAndDisbursementsList List Api /** * @swagger * /api/enquiriesAndDisbursementsList: * get: * summary: Enquiries And Disbursements List * description: Get Enquiries And Disbursements List against entity * parameters: * - in: query * name: entity_id * schema: * type: integer * required: true * description: id of the entity Details (primart key of entity) * example: 1 * responses: * 200: * description: success */ router.get("/enquiriesAndDisbursementsList", Entitycontroller.EnquiriesAndDisbursementsList); // Create new Entity Details /** * @swagger * definitions: * createEntityDetails: * type: object * properties: * loan_no_id: * type: integer * description: * example: 1 * losid: * type: string * description: * example: MW112233 * senp_sep: * type: string * description: * example: SNE * cat_of_sep: * type: string * description: * example: Doctors * sub_cat_of_sep: * type: string * description: * example: * entity_name: * type: string * description: * example: Gk Enterprises * bureau_name: * type: string * description: * example: Equifax * bureau_score: * type: string * description: * example: CMR-5 * entity_type: * type: string * description: * example: '3%' * entity_formation_date: * type: date * description: * example: "01-01-2020" * entity_vintage_years: * type: integer * description: * example: * total_no_of_members: * type: integer * description: * example: 1 * registered_address_of_business: * type: string * description: * example: D-block * registered_address_state: * type: string * description: * example: DELHI * registered_address_city: * type: string * description: * example: NEW DELHI * registered_address_pin: * type: integer * description: * example: 110003 * registered_address_ownership_status: * type: string * description: * example: owned * operating_address_of_business: * type: string * description: * example: D-block * operating_address_ownership_status: * type: string * description: * example: rented * operating_address_city_category: * type: string * description: * example: cat A * operating_address_state: * type: string * description: * example: DELHI * operating_address_city: * type: string * description: * example: NEW DELHI * operating_address_pin: * type: integer * description: * example: 110003 * operating_address_of_business_type: * type: string * description: * example: Within Geo-limits * type_of_business_activity: * type: string * description: * example: Retail Trader * no_of_yr_at_opaob: * type: integer * description: * example: 3 * area_in_which_at_opaob_is_located: * type: string * description: * example: Positive Area * workplace_type: * type: string * description: * example: Positive area * others: * type: string * description: * example: others * external_rating: * type: string * description: * example: NA * industry: * type: string * description: * example: Textile Industry (TO < Rs. 5 Cr.) * profile: * type: string * description: * example: Negative * other_industry: * type: string * description: * example: NULL * any_changes_in_dirship_parship_in_lst_6mns: * type: string * description: * example: Yes * is_the_change_related_to_key_promoter: * type: string * description: * example: No * remark_on_change__in_directorship: * type: string * description: * example: Testing * createdby: * type: integer * description: * example: 1 */ /** * @swagger * /api/createEntityDetails: * post: * summary: create entity details * description: create a new entity * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/createEntityDetails' * responses: * 200: * description: New entity details inserted * 500: * description: failure in inserting entity details Year */ router.post("/createEntityDetails", Entitycontroller.createEntityDetails); // update new Entity Details /** * @swagger * definitions: * updateEntityDetails: * type: object * properties: * id: * type: integer * description: * example: 1 * loan_no_id: * type: integer * description: * example: 1 * product: * type: string * description: * example: LFMP * pan_no: * type: string * description: * example: * losid: * type: string * description: * example: MW112233 * senp_sep: * type: string * description: * example: SNE * cat_of_sep: * type: string * description: * example: Doctors * sub_cat_of_sep: * type: string * description: * example: * entity_name: * type: string * description: * example: Gk Enterprises * bureau_name: * type: string * description: * example: Equifax * bureau_score: * type: string * description: * example: CMR-5 * entity_type: * type: string * description: * example: '3%' * entity_formation_date: * type: date * description: * example: "01-01-2020" * entity_vintage_years: * type: integer * description: * example: * total_no_of_members: * type: integer * description: * example: 1 * registered_address_of_business: * type: string * description: * example: D-block * registered_address_state: * type: string * description: * example: DELHI * registered_address_city: * type: string * description: * example: NEW DELHI * registered_address_pin: * type: integer * description: * example: 110003 * registered_address_ownership_status: * type: string * description: * example: owned * operating_address_of_business: * type: string * description: * example: D-block * operating_address_ownership_status: * type: string * description: * example: rented * operating_address_city_category: * type: string * description: * example: cat A * operating_address_state: * type: string * description: * example: DELHI * operating_address_city: * type: string * description: * example: NEW DELHI * operating_address_pin: * type: integer * description: * example: 110003 * operating_address_of_business_type: * type: string * description: * example: Within Geo-limits * type_of_business_activity: * type: string * description: * example: Retail Trader * no_of_yr_at_opaob: * type: integer * description: * example: 3 * area_in_which_at_opaob_is_located: * type: string * description: * example: Positive Area * workplace_type: * type: string * description: * example: Positive area * others: * type: string * description: * example: others * external_rating: * type: string * description: * example: NA * industry: * type: string * description: * example: Textile Industry (TO < Rs. 5 Cr.) * profile: * type: string * description: * example: Negative * other_industry: * type: string * description: * example: NULL * any_changes_in_dirship_parship_in_lst_6mns: * type: string * description: * example: Yes * is_the_change_related_to_key_promoter: * type: string * description: * example: No * remark_on_change__in_directorship: * type: string * description: * example: Testing * updatedby: * type: integer * description: * example: 1 */ /** * @swagger * /api/updateEntityDetails: * post: * summary: update entity details * description: update a new entity * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/updateEntityDetails' * responses: * 200: * description: New entity details updated * 500: * description: failure in updating entity details Year */ router.post("/updateEntityDetails", Entitycontroller.updateEntityDetails); // Create new Applicant and it's child Details (Relationship, Address, Property ownership) /** * @swagger * definitions: * createApplicantDetails: * type: object * properties: * loan_no_id: * type: integer * description: * example: 1 * losid: * type: string * description: * example: MW112233 * name: * type: string * description: * example: kumar * entity_type: * type: string * description: * example: Individual * designation: * type: string * description: * example: Proprietor * ownership_share_in_the_entity: * type: integer * description: * example: 1 * applicant_type: * type: string * description: * example: Guarantor * key_promoter: * type: string * description: * example: Yes * bureau_name: * type: string * description: * example: CRIF High Mark * bureau_score: * type: integer * description: * example: NULL * heir_in_business_and_on_loan_struct: * type: string * description: * example: Yes * nri: * type: integer * description: * example: Yes * createdby: * type: integer * description: * example: 003 */ /** * @swagger * definitions: * applicant_relationship: * type: object * properties: * name_of_the_individual: * type: string * description: * example: kumar * related_to: * type: string * description: * example: gowtham * relationship: * type: string * description: * example: Brother * is_main_person_running_the_business: * type: string * description: No * example: kumar * no_of_years_in_this_entity: * type: integer * description: * example: 3 * no_of_years_in_same_line_of_buss: * type: integer * description: * example: 5 * dob: * type: date * description: * example: 1996-06-04 * age: * type: integer * description: * example: 25 * gender: * type: string * description: * example: Male * remarks: * type: string * description: * example: Nothing * createdby: * type: integer * description: * example: 003 */ /** * @swagger * definitions: * residence_address: * type: object * properties: * name_of_the_individual: * type: string * description: * example: kumar * residence_address: * type: string * description: * example: Chennai * residence_geo_limit_compliance: * type: string * description: * example: Within Geo-Limits * residence_location_area: * type: string * description: No * example: Positive Area * ownership_status: * type: string * description: * example: Owned * residence_stay_period_in_years: * type: integer * description: * example: 5 * residence_stay_period_in_bracket: * type: date * description: * example: '> = 1 Yr' * remarks: * type: string * description: * example: Nothing * createdby: * type: integer * description: * example: 003 */ /** * @swagger * definitions: * property_ownership_income_considered: * type: object * properties: * name_of_the_loan_applicants: * type: string * description: * example: kumar * applicant_type: * type: string * description: * example: Guarantor * income_considered: * type: string * description: * example: Yes * property_owner: * type: string * description: Yes * createdby: * type: integer * description: * example: 003 */ /** * @swagger * /api/createApplicantDetails: * post: * summary: create ApplicantDetails Details * description: create Applicants Details and relationship/residenceAddress and property_ownership_income_considered * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/createApplicantDetails' * responses: * 200: * description: New ApplicantDetails created * 500: * description: failure in creating ApplicantDetails */ router.post("/createApplicantDetails", Entitycontroller.createApplicantDetails); // update Applicant Details /** * @swagger * definitions: * updateApplicantDetails: * type: object * properties: * id: * type: integer * description: * example: 10 * loan_no_id: * type: integer * description: * example: 1 * pan_no: * type: string * description: * example: * losid: * type: string * description: * example: MW112233 * name: * type: string * description: * example: Kumaran * entity_type: * type: string * description: * example: Individual * designation: * type: string * description: * example: Proprietor * ownership_share_in_the_entity: * type: integer * description: * example: 5 * applicant_type: * type: string * description: * example: Guarantor * key_promoter: * type: string * description: * example: Yes * bureau_name: * type: string * description: * example: CRIF High Mark * bureau_score: * type: string * description: * example: NULL * heir_in_business_and_on_loan_struct: * type: string * description: * example: Yes * nri: * type: string * description: * example: Yes * updatedby: * type: integer * description: * example: 1 */ /** * @swagger * /api/updateApplicantDetails: * post: * summary: update ApplicantDetails Details * description: update Applicants Details * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/updateApplicantDetails' * responses: * 200: * description: New ApplicantDetails updated * 500: * description: failure in updating ApplicantDetails */ router.post("/updateApplicantDetails", Entitycontroller.updateApplicantDetails); // update ApplicantsRelationship Data /** * @swagger * definitions: * updateApplicantsRelationship: * type: object * properties: * id: * type: integer * description: * example: 3 * loan_no_id: * type: integer * description: * example: 1 * losid: * type: string * description: * example: MW112233 * applicant_id: * type: integer * description: * example: 10 * name_of_the_individual: * type: string * description: * example: Kumaran * related_to: * type: string * description: * example: Gowtham * relationship: * type: string * description: * example: Brother * is_main_person_running_the_business: * type: string * description: * example: No * no_of_years_in_this_entity: * type: integer * description: * example: 3 * no_of_years_in_same_line_of_buss: * type: integer * description: * example: 5 * dob: * type: string * description: * example: 1996-06-04 * age: * type: integer * description: * example: 25 * gender: * type: string * description: * example: Male * remarks: * type: string * description: * example: Nothing * createdby: * type: integer * description: * example: 1 * updatedby: * type: integer * description: * example: 1 */ /** * @swagger * /api/updateApplicantsRelationship: * post: * summary: update Applicants Relationship Details * description: create a new ApplicantsRelationship data and deactivate old ApplicantsRelationship data * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/updateApplicantsRelationship' * responses: * 200: * description: ApplicantsRelationship data updated * 500: * description: failure in updating ApplicantsRelationship */ router.post("/updateApplicantsRelationship", Entitycontroller.updateApplicantsRelationship); // update ResidenceAddressDetails Data /** * @swagger * definitions: * updateResidenceAddressDetails: * type: object * properties: * id: * type: integer * description: * example: 6 * loan_no_id: * type: integer * description: * example: 1 * losid: * type: string * description: * example: MW112233 * applicant_id: * type: integer * description: * example: 10 * name_of_the_individual: * type: string * description: * example: Kumaran * residence_address: * type: string * description: * example: Chennai * residence_geo_limit_compliance: * type: string * description: * example: Within Geo-Limits * residence_location_area: * type: string * description: * example: Positive Area * ownership_status: * type: string * description: * example: owned * residence_stay_period_in_years: * type: integer * description: * example: 2 * residence_stay_period_in_bracket: * type: string * description: * example: ">=1Yr" * remarks: * type: string * description: * example: Nothing * createdby: * type: integer * description: * example: 1 * updatedby: * type: integer * description: * example: 1 */ /** * @swagger * /api/updateResidenceAddressDetails: * post: * summary: update Residence Address Details * description: create a new ResidenceAddressDetails data and deactivate old ResidenceAddressDetails data * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/updateResidenceAddressDetails' * responses: * 200: * description: ResidenceAddressDetails data updated * 500: * description: failure in updating ResidenceAddressDetails */ router.post("/updateResidenceAddressDetails", Entitycontroller.updateResidenceAddressDetails); // update PropertyOwnership/IncomeConsidered Data /** * @swagger * definitions: * updatePropertyOwnershipIncomeConsidered: * type: object * properties: * id: * type: integer * description: * example: 8 * loan_no_id: * type: integer * description: * example: 1 * losid: * type: string * description: * example: MW112233 * applicant_id: * type: integer * description: * example: 10 * name_of_the_loan_applicants: * type: string * description: * example: Kumaran * applicant_type: * type: string * description: * example: Guarantor * income_considered: * type: string * description: * example: Yes * property_owner: * type: string * description: * example: Yes * createdby: * type: integer * description: * example: 1 * updatedby: * type: integer * description: * example: 1 */ /** * @swagger * /api/updatePropertyOwnershipIncomeConsidered: * post: * summary: update PropertyOwnership/IncomeConsidered Details * description: create a new PropertyOwnership/IncomeConsidered data and deactivate old PropertyOwnership/IncomeConsidered data * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/updatePropertyOwnershipIncomeConsidered' * responses: * 200: * description: PropertyOwnership IncomeConsidered data updated * 500: * description: failure in updating PropertyOwnership IncomeConsidered data */ router.post("/updatePropertyOwnershipIncomeConsidered", Entitycontroller.updatePropertyOwnershipIncomeConsidered); // Create new TradeReferences Details /** * @swagger * definitions: * createTradeReferencesDetails: * type: object * properties: * entity_id: * type: integer * description: * example: 1 * name: * type: string * description: * example: Kumaran * contact: * type: integer * description: * example: 8545215455 * feedback: * type: string * description: * example: text * feedback_result: * type: string * description: * example: No Feedback * createdby: * type: integer * description: * example: 1 */ /** * @swagger * /api/createTradeReferencesDetails: * post: * summary: create TradeReferences Details * description: create a new TradeReferences Details * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/createTradeReferencesDetails' * responses: * 200: * description: New TradeReferencesDetails inserted * 500: * description: failure in inserting TradeReferencesDetails */ router.post("/createTradeReferencesDetails", Entitycontroller.createTradeReferencesDetails); // Update TradeReferences Details /** * @swagger * definitions: * updateTradeReferencesDetails: * type: object * properties: * id: * type: integer * description: * example: 1 * entity_id: * type: integer * description: * example: 1 * name: * type: string * description: * example: Kumaran * contact: * type: integer * description: * example: 8545215455 * feedback: * type: string * description: * example: text * feedback_result: * type: string * description: * example: No Feedback * createdby: * type: integer * description: * example: 1 * updatedby: * type: integer * description: * example: 1 */ /** * @swagger * /api/updateTradeReferencesDetails: * post: * summary: update TradeReferences Details * description: update a new TradeReferences Details * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/updateTradeReferencesDetails' * responses: * 200: * description: New TradeReferencesDetails inserted deactivate old data * 500: * description: failure in updating TradeReferencesDetails */ router.post("/updateTradeReferencesDetails", Entitycontroller.updateTradeReferencesDetails); // Create new Enquiries And Disbursements Details /** * @swagger * definitions: * createEnquiriesAndDisbursementsDetails: * type: object * properties: * entity_id: * type: integer * description: * example: 1 * no_of_enquiries: * type: integer * description: * example: 5 * no_of_disbursements: * type: integer * description: * example: 5 * createdby: * type: integer * description: * example: 1 */ /** * @swagger * /api/createEnquiriesAndDisbursementsDetails: * post: * summary: create Enquiries And Disbursements Details * description: create a new EnquiriesAndDisbursementsDetails * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/createEnquiriesAndDisbursementsDetails' * responses: * 200: * description: New EnquiriesAndDisbursements Details inserted * 500: * description: failure in inserting EnquiriesAndDisbursements Details */ router.post("/createEnquiriesAndDisbursementsDetails", Entitycontroller.createEnquiriesAndDisbursementsDetails); //update Enquiries And Disbursements Details /** * @swagger * definitions: * updateEnquiriesAndDisbursementsDetails: * type: object * properties: * id: * type: integer * description: * example: 1 * entity_id: * type: integer * description: * example: 1 * no_of_enquiries: * type: integer * description: * example: 5 * no_of_disbursements: * type: integer * description: * example: 5 * createdby: * type: integer * description: * example: 1 * updatedby: * type: integer * description: * example: 1 */ /** * @swagger * /api/updateEnquiriesAndDisbursementsDetails: * post: * summary: update Enquiries And Disbursements Details * description: update a EnquiriesAndDisbursementsDetails * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/updateEnquiriesAndDisbursementsDetails' * responses: * 200: * description: New updateEnquiriesAndDisbursementsDetails updated deactivate old data * 500: * description: failure in updating updateEnquiriesAndDisbursementsDetails */ router.post("/updateEnquiriesAndDisbursementsDetails", Entitycontroller.updateEnquiriesAndDisbursementsDetails); // Update DueDiligenceCheck Details /** * @swagger * definitions: * updateDueDiligenceCheck: * type: array * items: * type: object * properties: * id: * type: integer * description: * example: 1 * entity_id: * type: integer * description: * example: 1 * check_type_id: * type: integer * description: * example: 1 * check_type: * type: string * description: * example: ROC Check * check_result: * type: string * description: * example: Negative * remarks: * type: string * description: * example: No Feedback * updatedby: * type: integer * description: * example: 1 */ /** * @swagger * /api/updateDueDiligenceCheck: * post: * summary: update updateDueDiligenceCheck Details * description: update DueDiligenceCheck * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/updateDueDiligenceCheck' * responses: * 200: * description: New updated DueDiligenceCheck * 500: * description: failure in updating TradeReferencesDetails */ router.post("/updateDueDiligenceCheck", Entitycontroller.updateDueDiligenceCheck); // Master data Api's // EntityApplicantMaster data select api /** * @swagger * /api/entityApplicantMasterData: * get: * summary: Entity Applicant MasterData Api * description: Entity Applicant MasterData value * responses: * 200: * description: success */ router.get("/entityApplicantMasterData", Mastercontroller.EntityApplicantMasterData); //line 7 // create EntityApplicantMasterData api /** * @swagger * definitions: * createEntityApplicantMasterData: * type: object * properties: * master_name: * type: string * description: masterName * example: abcd * value: * type: string * description: masterValue * example: ABCD * sub_value: * type: string * description: subValue * example: Negative * is_active: * type: integer * description: isactive * example: 1 */ /** * @swagger * /api/createEntityApplicantMasterData: * post: * summary: create entity applicant details * description: create a new entity applicant * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/createEntityApplicantMasterData' * responses: * 200: * description: New entity applicant details inserted * 500: * description: failure in inserting entity applicant details */ router.post("/createEntityApplicantMasterData", Mastercontroller.CreateEntityApplicantMasterData); // line 31 // StateMasterData select api /** * @swagger * /api/stateMasterData: * get: * summary: Dropdown state master data Api * description: All master data for dropdown value * responses: * 200: * description: success */ router.get("/stateMasterData", Mastercontroller.StateMasterData); // line 82 // CityMasterData select api /** * @swagger * /api/cityMasterData: * get: * summary: Dropdown city master data Api * description: All master data for dropdown value * parameters: * - in: query * name: state_id * schema: * type: integer * required: true * description: id of the stateMaster (primart key of state value) * example: 1 * responses: * 200: * description: success */ router.get("/cityMasterData", Mastercontroller.CityMasterData); // line 106 // PinMasterData select api /** * @swagger * /api/pinMasterData: * get: * summary: Dropdown pin master data Api * description: pin code master data for dropdown value * parameters: * - in: query * name: state_id * schema: * type: integer * required: true * description: id of the stateMaster (primart key of state value) * example: 1 * responses: * 200: * description: success */ router.get("/pinMasterData", Mastercontroller.PinMasterData); // line 130 // CheckResultMaster select api /** * @swagger * /api/checkResultMasterData: * get: * summary: check Result MasterData data Api * description: heck Result MasterData for dropdown value * responses: * 200: * description: success */ router.get("/checkResultMasterData", Mastercontroller.CheckResultMaster); // create CreateCheckTypeMaster api /** * @swagger * definitions: * CreateCheckTypeMaster: * type: object * properties: * value: * type: string * description: masterValue * example: ROC check * is_active: * type: integer * description: isactive * example: 1 */ /** * @swagger * /api/CreateCheckTypeMaster: * post: * summary: create CheckType Master details * description: create a CheckType Master * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/CreateCheckTypeMaster' * responses: * 200: * description: New CheckType Master details inserted * 500: * description: failure in inserting CheckType Master details */ router.post("/CreateCheckTypeMaster", Mastercontroller.CreateCheckTypeMaster); // line 31 // create CreateRelationMaster api /** * @swagger * definitions: * CreateRelationMaster: * type: object * properties: * check_type_id: * type: integer * description: checkTypeId * example: 1 * check_result_id: * type: integer * description: checkResultId * example: 1 * is_active: * type: integer * description: isactive * example: 1 */ /** * @swagger * /api/CreateRelationMaster: * post: * summary: create RelationMaster details * description: create a Relation Master * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/CreateRelationMaster' * responses: * 200: * description: New RelationMaster inserted * 500: * description: failure in inserting RelationMaster details */ router.post("/CreateRelationMaster", Mastercontroller.CreateRelationMaster); // line 31 // create Property & LTV Details /** * @swagger * definitions: * createPropertyAndLtv: * type: object * properties: * losid: * type: string * description: losid * example: MW112233 * product: * type: string * description: product * example: LFMP * address_of_prop_to_be_mortgaged: * type: string * description: address * example: * property_type: * type: string * description: property type * example: Residential * property_usage: * type: string * description: Property Usage * example: Self Occupied * structure_type: * type: string * description: structure type * example: Flat * slum_type: * type: string * description: slum type * example: Communal Housing * property_completion_stage: * type: string * description: property completion stage * example: Under-Construction * stage_of_construction: * type: string * description: stage of construction * example: * property_area: * type: string * description: property area * example: Positive * activity_in_property: * type: string * description: activity in property * example: Commercial * mark_valuation_1: * type: integer * description: mark valuation 1 * example: * mark_valuation_2: * type: integer * description: mark valuation 2 * example: * variance_in_mv1_and_mv2: * type: integer * description: variance in mv1 and mv2 * example: * third_val_not_req: * type: integer * description: third val not req * example: * override: * type: string * description: override * example: Higher * market_val_considered_for_ltv_calculation: * type: integer * description: market val considered for ltv calculation * example: * ltv_on_loan_applied_for: * type: string * description: ltv on loan applied for * example: * max_ltv_norms_as_per_policy: * type: string * description: max ltv norms as per policy * example: * ltv_norms: * type: string * description: ltv norms * example: * residual_life_of_property_for_1yr: * type: string * description: residual life of property for 1yr * example: * residual_life_of_property_for_2yr: * type: string * description: residual life of property for 2yr * example: * residual_life_of_property_considered_years: * type: string * description: residual life of property considered years * example: * third_val_not_done: * type: string * description: third val not done * example: * comp_of_loan_tenure_to_residual_life_of_property: * type: string * description: comp of loan tenure to residual life of property * example: * norms_of_residual_age_of_property_years: * type: string * description: norms of residual age of property years * example: * carpet_area_of_property_to_be_mortgage_sqft: * type: string * description: carpet area of property to be mortgage sqft * example: * carpet_area_of_property_norms: * type: string * description: carpet area of property norms * example: * createdby: * type: integer * description: * example: 1 * updatedby: * type: integer * description: * example: 1 * is_active: * type: integer * description: * example: 1 */ /** * @swagger * /api/createPropertyAndLtv: * post: * summary: create Property And Ltv Details * description: create Property And Ltv Details * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/createPropertyAndLtv' * responses: * 200: * description: New Property And Ltv Details inserted * 500: * description: failure in inserting Property And Ltv Details */ router.post("/createPropertyAndLtv", Entitycontroller.createPropertyAndLtv); // update Property & LTV Details /** * @swagger * definitions: * updatePropertyAndLtv: * type: object * properties: * id: * type: integer * description: * example: 1 * losid: * type: string * description: losid * example: MW112233 * product: * type: string * description: product * example: LFMP * address_of_prop_to_be_mortgaged: * type: string * description: address * example: * property_type: * type: string * description: property type * example: Residential * property_usage: * type: string * description: Property Usage * example: Self Occupied * structure_type: * type: string * description: structure type * example: Flat * slum_type: * type: string * description: slum type * example: Communal Housing * property_completion_stage: * type: string * description: property completion stage * example: Under-Construction * stage_of_construction: * type: string * description: stage of construction * example: * property_area: * type: string * description: property area * example: Positive * activity_in_property: * type: string * description: activity in property * example: Commercial * mark_valuation_1: * type: integer * description: mark valuation 1 * example: * mark_valuation_2: * type: integer * description: mark valuation 2 * example: * variance_in_mv1_and_mv2: * type: integer * description: variance in mv1 and mv2 * example: * override: * type: string * description: override * example: Higher * market_val_considered_for_ltv_calculation: * type: integer * description: market val considered for ltv calculation * example: * ltv_on_loan_applied_for: * type: string * description: ltv on loan applied for * example: * max_ltv_norms_as_per_policy: * type: string * description: max ltv norms as per policy * example: * ltv_norms: * type: string * description: ltv norms * example: * residual_life_of_property_for_1yr: * type: string * description: residual life of property for 1yr * example: * residual_life_of_property_for_2yr: * type: string * description: residual life of property for 2yr * example: * residual_life_of_property_considered_years: * type: string * description: residual life of property considered years * example: * comp_of_loan_tenure_to_residual_life_of_property: * type: string * description: comp of loan tenure to residual life of property * example: * norms_of_residual_age_of_property_years: * type: string * description: norms of residual age of property years * example: * carpet_area_of_property_to_be_mortgage_sqft: * type: string * description: carpet area of property to be mortgage sqft * example: * carpet_area_of_property_norms: * type: string * description: carpet area of property norms * example: * createdby: * type: integer * description: * example: 1 * updatedby: * type: integer * description: * example: 1 * is_active: * type: integer * description: * example: 1 */ /** * @swagger * /api/updatePropertyAndLtv: * post: * summary: update Property And Ltv Details * description: update Property And Ltv Details * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/updatePropertyAndLtv' * responses: * 200: * description: New Property And Ltv Details inserted * 500: * description: failure in inserting Property And Ltv Details */ router.post("/updatePropertyAndLtv", Entitycontroller.updatePropertyAndLtv); // Property & LTV Details List Api /** * @swagger * /api/PropertyAndLtvList: * get: * summary: Property And Ltv List * description: Get Property And Ltv List * parameters: * - in: query * name: losid * schema: * type: string * required: true * description: Loan ID * example: MW112233 * responses: * 200: * description: success */ router.get("/PropertyAndLtvList", Entitycontroller.PropertyAndLtvList); router.get("/deletePropertyAndLtv", Entitycontroller.deletePropertyAndLtv); // loan and ltv select api /** * @swagger * /api/loanAndLtvMaster: * get: * summary: Dropdown loan And property & Ltv Master Api * description: All master data for dropdown value * parameters: * - in: query * name: losid * schema: * type: string * required: true * description: id of the entity Details (primart key of entity) * example: MW112233 * responses: * 200: * description: success */ router.get("/loanAndLtvMaster", Mastercontroller.loanAndLtvMaster); // atnwRelationMaster select api /** * @swagger * /api/atnwRelationMaster: * get: * summary: atnw Relation Master data Api * description: atnw Relation Master data Api * responses: * 200: * description: success */ router.get("/atnwRelationMaster", Mastercontroller.atnwRelationMaster); // Update updateATNWrelatedInputs Details /** * @swagger * definitions: * updateATNWrelatedInputs: * type: array * items: * type: object * properties: * id: * type: integer * description: * example: 1 * entity_id: * type: integer * description: * example: 1 * atnw_related_input_id: * type: integer * description: * example: 1 * atnw_related_input: * type: string * description: * example: property_own_doc_avail * atnw_related_input_value: * type: string * description: * example: Yes * updatedby: * type: integer * description: * example: 1 * subValue: * type: array * items: * type: object * properties: * id: * type: integer * description: * example: 1 * master_id: * type: integer * description: * example: 1 * atnw_related_input: * type: integer * description: * example: 1 * atnw_related_input_value: * type: integer * description: * example: 1 * updatedby: * type: integer * description: * example: 1 */ /** * @swagger * /api/updateATNWrelatedInputs: * post: * summary: update updateATNWrelatedInputs Details * description: update updateATNWrelatedInputs * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/updateATNWrelatedInputs' * responses: * 200: * description: New updated updateATNWrelatedInputs * 500: * description: failure in updating updateATNWrelatedInputs */ router.post("/updateATNWrelatedInputs", Entitycontroller.updateATNWrelatedInputs); // atnwrelatedInputsList Api /** * @swagger * /api/atnwrelatedInputsList: * get: * summary: atnw related Inputs List * description: Get atnw related Inputs List by sending entity id(Primery key) * parameters: * - in: query * name: entity_id * schema: * type: integer * required: true * description: id of the entity Details (primart key of entity) * example: 1 * responses: * 200: * description: success */ router.get("/atnwrelatedInputsList", Entitycontroller.ATNWrelatedInputsList); // otherParameter Master select api /** * @swagger * /api/otherParameterMaster: * get: * summary: other Parameter Master data Api * description: other Parameter Master data Api * responses: * 200: * description: success */ router.get("/otherParameterMaster", Mastercontroller.otherParameterMaster); // Update updateOtherParameters Details /** * @swagger * definitions: * updateOtherParameters: * type: array * items: * type: object * properties: * id: * type: integer * description: * example: 1 * entity_id: * type: integer * description: * example: 1 * op_master_id: * type: integer * description: * example: 1 * master_name: * type: string * description: * example: property_own_doc_avail * value: * type: string * description: * example: Yes * updatedby: * type: integer * description: * example: 1 */ /** * @swagger * /api/updateOtherParameters: * post: * summary: update updateOtherParameters Details * description: update updateOtherParameters * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/updateOtherParameters' * responses: * 200: * description: New updated updateOtherParameters * 500: * description: failure in updating updateOtherParameters */ router.post("/updateOtherParameters", Entitycontroller.updateOtherParameters); // OtherParametersList Api /** * @swagger * /api/otherParametersList: * get: * summary: other Parameters List * description: Get other Parameters List by sending entity id(Primery key) * parameters: * - in: query * name: entity_id * schema: * type: integer * required: true * description: id of the entity Details (primart key of entity) * example: 1 * responses: * 200: * description: success */ router.get("/otherParametersList", Entitycontroller.OtherParametersList); // update Property & LTV Details /** * @swagger * definitions: * updateLoanDetail: * type: object * properties: * id: * type: integer * description: * example: 2 * losid: * type: string * description: * example: MW112233 * product: * type: string * description: * example: LFMP * date_of_login: * type: integer * description: * example: 2021/05/05 * sourcing_channel_type: * type: integer * description: * example: Connector * sourcing_channel_name: * type: integer * description: * example: Test Name * proposal: * type: integer * description: * example: Fresh * sanction_date_of_earlier_exposure: * type: string * description: * example: * sanction_amount_of_earlier_exposure: * type: integer * description: * example: * current_outstnd_bal_of_earlier_exposure: * type: integer * description: * example: * emi_of_earlier_exposure: * type: integer * description: * example: * additional_loan_amnt_applied_for: * type: integer * description: * example: 5000000 * insurance_premium_amnt_being_funded: * type: integer * description: * example: 500000 * insurance_premium_loan_applied_for: * type: integer * description: * example: 1 * additional_loan_amnt_applied_for_and_insu_premium: * type: integer * description: * example: 5500000 * load_tenure_applied_for_months: * type: integer * description: * example: 30 * rate_of_interest_per_annum: * type: integer * description: * example: 1 * emi_per_lac_of_loan: * type: integer * description: * example: * purpose_of_loan: * type: integer * description: * example: * emi_of_loan_applied_for: * type: integer * description: * example: * createdby: * type: integer * description: * example: 1 * updatedby: * type: integer * description: * example: 1 * is_active: * type: integer * description: * example: 1 */ /** * @swagger * /api/updateLoanDetail: * post: * summary: update LoanDetail * description: update LoanDetail * requestBody: * content: * application/json: * schema: * $ref: '#/definitions/updateLoanDetail' * responses: * 200: * description: New LoanDetail inserted * 500: * description: failure in inserting LoanDetail */ router.post("/updateLoanDetail", Entitycontroller.updateLoanDetail); // Pan List Api For Cibil /** * @swagger * /api/ApplicantPanList: * get: * summary: LoanDeatil ,entity detail & applicant detail List for cibil module Api * description: LoanDeatil ,entity detail & applicant detail List for cibil module Api * parameters: * - in: query * name: losid * schema: * type: string * required: true * description: id of the loan detail Details * example: MW112233 * responses: * 200: * description: success */ router.get("/ApplicantPanList", Entitycontroller.ApplicantPanList); // Data From Los Api /** * @swagger * /api/DataFromLos: * get: * summary: Data From Los List * description: Data From Los List * responses: * 200: * description: success */ router.get("/DataFromLos", Entitycontroller.DataFromLos); // Formula Master List api /** * @swagger * /api/FormulaMasterList: * get: * summary: Formula Master List * description: Formula Master List * responses: * 200: * description: success */ router.get("/FormulaMasterList", Entitycontroller.FormulaMasterList); // Formula Master List api /** * @swagger * /api/MainAppMasterDataList: * get: * summary: Master List ( FormulaMasterData , EntityApplicantMasterData , LoanAndLtvMasterData ) * description: Master List * responses: * 200: * description: success */ router.get("/MainAppMasterDataList", Entitycontroller.MainAppMasterDataList); // delete trade reference api /** * @swagger * /api/DeleteTradeReference: * delete: * summary: delete trade reference api * description: delete trade reference api * parameters: * - in: query * name: id * schema: * type: integer * required: true * description: id * example: 1 * responses: * 200: * description: success */ router.delete("/DeleteTradeReference", Entitycontroller.DeleteTradeReference); // mainLandingPage Api /** * @swagger * /api/mainLandingPage: * get: * summary: LoanDeatil List TEST Api * description: LoanDeatil List TEST Api * parameters: * - in: query * name: losid * schema: * type: string * required: true * description: Loan ID * example: MW112233 * - in: query * name: is_loan_api_call * schema: * type: integer * required: true * description: if the value is 1 = Call Loan Detail api , 0 = Don't Call Loan Detail api * example: 1 * responses: * 200: * description: success */ router.get("/mainLandingPage", Loancontroller.mainLandingPage); router.get("/getfilename", Testcontroller.readLogFileName); router.post("/readlogs", Testcontroller.readLogFile); router.get("/view", Testcontroller.viewLandingPage); router.post("/deletelog", Testcontroller.deleteLogFile); // routes started here app.use('/api', router); };