UpdateApi:GWM

This commit is contained in:
sriramv 2022-03-07 11:30:53 +05:30
parent 80013c49b2
commit 286b5dabbc
10 changed files with 1262 additions and 36 deletions

View File

@ -1,8 +1,10 @@
const { sequelize , EntityDetails , ApplicantsDetails , ApplicantsRelationship , ResidenceAddressDetails , PropertyOwnershipIncomeConsidered} = require('../models')
const { sequelize , LoanDetail , EntityDetails , ApplicantsDetails , ApplicantsRelationship , ResidenceAddressDetails , PropertyOwnershipIncomeConsidered , DueDiligenceCheck , TradeReferences} = require('../models')
const { logMsg } = require('../services/logger.js');
//create EntityDetails Api
exports.createEntityDetails = async (req, res) =>
{
try
@ -24,6 +26,32 @@ exports.createEntityDetails = async (req, res) =>
};
//update Entity Details Api
exports.updateEntityDetails = async (req, res) =>
{
try
{
id = req.body.id;
delete req.body.id;
// update check value
EntityDetails.update(req.body,{ where: { id: id }}).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
})
.catch(err => {
res.send({'status':404,
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
});
} catch(err) {
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
} //end of try catch
};
//create Applicant Details with ResidenceAddress & ApplicantRelationship & PropertyOwnership Details (or) Applicant Details with PropertyOwnership Details
exports.createApplicantDetails = async (req, res) =>
{
try
@ -39,22 +67,24 @@ exports.createApplicantDetails = async (req, res) =>
{
if(req.body.entity_type == "Individual")
{
ApplicantsRelationshipData = Object.assign(ApplicantsRelationshipData, {loan_no_id: req.body.loan_no_id});
ApplicantsRelationshipData = Object.assign(ApplicantsRelationshipData, {applicant_id: data.dataValues.id});
await ApplicantsRelationship.create(ApplicantsRelationshipData)
.then(data=>{logMsg.info("ApplicantsRelationship inserted");}).catch(err=>{logMsg.info("ApplicantsRelationship Failed , Msg :" +err);});
ResidenceAddressDetailsData = Object.assign(ResidenceAddressDetailsData, {loan_no_id: req.body.loan_no_id});
ResidenceAddressDetailsData = Object.assign(ResidenceAddressDetailsData, {applicant_id: data.dataValues.id});
await ResidenceAddressDetails.create(ResidenceAddressDetailsData)
.then(data=>{logMsg.info("ResidenceAddressDetails inserted");}).catch(err=>{logMsg.info("ResidenceAddressDetails Failed , Msg :" +err);});
PropertyOwnershipIncomeConsideredData = Object.assign(PropertyOwnershipIncomeConsideredData, {loan_no_id: req.body.loan_no_id});
PropertyOwnershipIncomeConsideredData = Object.assign(PropertyOwnershipIncomeConsideredData, {applicant_id: data.dataValues.id});
await PropertyOwnershipIncomeConsidered.create(PropertyOwnershipIncomeConsideredData)
.then(data=>{logMsg.info("PropertyOwnershipIncomeConsidered inserted");}).catch(err=>{logMsg.info("PropertyOwnershipIncomeConsidered Failed , Msg :" +err);});
}
else {
else
{
PropertyOwnershipIncomeConsideredData = Object.assign(PropertyOwnershipIncomeConsideredData, {loan_no_id: req.body.loan_no_id});
PropertyOwnershipIncomeConsideredData = Object.assign(PropertyOwnershipIncomeConsideredData, {applicant_id: data.dataValues.id});
await PropertyOwnershipIncomeConsidered.create(PropertyOwnershipIncomeConsideredData)
.then(data=>{logMsg.info("PropertyOwnershipIncomeConsidered inserted");}).catch(err=>{logMsg.info("PropertyOwnershipIncomeConsidered Failed , Msg :" +err);});
@ -76,13 +106,236 @@ exports.createApplicantDetails = async (req, res) =>
};
//update ApplicantDetails
exports.updateApplicantDetails = async (req, res) =>
{
try
{
id = req.body.id;
delete req.body.id;
ApplicantsDetails.update(req.body,{ where: { id: id }}).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
})
.catch(err => {
res.send({'status':404,
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
});
} catch(err) {
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
} //end of try catch
};
//update ApplicantsRelationship Api (Deactivate old value create new record)
exports.updateApplicantsRelationship = async (req, res) =>
{
try
{
id = req.body.id;
updatedby = req.body.updatedby;
delete req.body.id;
delete req.body.updatedby;
// update old value is_active = 0 where requested id
await ApplicantsRelationship.update({ updatedby : updatedby ,is_active : 0 },{ where: { id: id }});
// create new entry
ApplicantsRelationship.create(req.body).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
})
.catch(err => {
res.send({'status':404,
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
});
} catch(err) {
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
} //end of try catch
}
//update ResidenceAddressDetails Api (Deactivate old value create new record)
exports.updateResidenceAddressDetails = async (req, res) =>
{
try
{
id = req.body.id;
updatedby = req.body.updatedby;
delete req.body.id;
delete req.body.updatedby;
// update old value is_active = 0 where requested id
await ResidenceAddressDetails.update({ updatedby : updatedby ,is_active : 0 },{ where: { id: id }});
// create new entry
ResidenceAddressDetails.create(req.body).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
})
.catch(err => {
res.send({'status':404,
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
});
} catch(err) {
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
} //end of try catch
}
//update PropertyOwnership and IncomeConsidered data Api (Deactivate old value create new record)
exports.updatePropertyOwnershipIncomeConsidered = async (req, res) =>
{
try
{
id = req.body.id;
updatedby = req.body.updatedby;
delete req.body.id;
delete req.body.updatedby;
// update old value is_active = 0 where requested id
await PropertyOwnershipIncomeConsidered.update({ updatedby : updatedby ,is_active : 0 },{ where: { id: id }});
// create new entry
PropertyOwnershipIncomeConsidered.create(req.body).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
})
.catch(err => {
res.send({'status':404,
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
});
} catch(err) {
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
} //end of try catch
}
//create TradeReferencesDetails Api
exports.createTradeReferencesDetails = async (req, res) =>
{
try
{
TradeReferences.create(req.body).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
})
.catch(err => {
res.send({'status':404,
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
});
} catch(err) {
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
} //end of try catch
};
//update TradeReferencesDetails Api (Deactivate old value create new record)
exports.updateTradeReferencesDetails = async (req, res) =>
{
try
{
id = req.body.id;
updatedby = req.body.updatedby;
delete req.body.id;
delete req.body.updatedby;
// update old value is_active = 0 where requested id
await TradeReferences.update({ updatedby : updatedby ,is_active : 0 },{ where: { id: id }});
// create new entry
TradeReferences.create(req.body).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
})
.catch(err => {
res.send({'status':404,
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
});
} catch(err) {
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
} //end of try catch
};
//update DueDiligenceCheck Api
exports.updateDueDiligenceCheck = async (req, res) =>
{
try
{
id = req.body.id;
delete req.body.id;
// update value
DueDiligenceCheck.update(req.body,{ where: { id: id }}).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
})
.catch(err => {
res.send({'status':404,
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
});
} catch(err) {
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
} //end of try catch
};
//LoanNumberDetails List Api
exports.LoanNumberDetailsList = async (req, res) =>
{
try
{
LoanDetail.findAll({raw: true , where : {is_active : 1}}).then(data =>
{
if(data.length > 0)
{
res.send({'status':200,'message':"success",'data':data});
}
else {
res.send({'status':404,'message':"failed",'data':"No data"});
}
})
.catch(err => {
res.send({'status':404,
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
});
} catch(err) {
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
} //end of try catch
};
//EntityDetails List Api
exports.EntityDetailsList = async (req, res) =>
{
try
{
EntityDetails.findAll({where:{loan_no_id : req.query.loan_no_id}}).then(data =>
EntityDetails.findAll({raw: true ,where:{loan_no_id : req.query.loan_no_id , is_active : 1}}).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
if(data.length > 0)
{
res.send({'status':200,'message':"success",'data':data});
}
else {
res.send({'status':404,'message':"failed",'data':"No data"});
}
})
.catch(err => {
@ -96,13 +349,21 @@ exports.EntityDetailsList = async (req, res) =>
};
//ApplicantDetails List Api
exports.ApplicantDetailsList = async (req, res) =>
{
try
{
ApplicantsDetails.findAll({where:{loan_no_id : req.query.loan_no_id}}).then(data =>
ApplicantsDetails.findAll({raw: true , where:{loan_no_id : req.query.loan_no_id , is_active : 1}}).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
if(data.length > 0)
{
res.send({'status':200,'message':"success",'data':data});
}
else {
res.send({'status':404,'message':"failed",'data':"No data"});
}
})
.catch(err => {
@ -116,13 +377,21 @@ exports.ApplicantDetailsList = async (req, res) =>
};
//ApplicantRelationship List Api
exports.ApplicantRelationshipList = async (req, res) =>
{
try
{
ApplicantsRelationship.findAll({where:{loan_no_id : req.query.loan_no_id }}).then(data =>
ApplicantsRelationship.findAll({raw: true , where:{loan_no_id : req.query.loan_no_id , is_active : 1 }}).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
if(data.length > 0)
{
res.send({'status':200,'message':"success",'data':data});
}
else {
res.send({'status':404,'message':"failed",'data':"No data"});
}
})
.catch(err => {
@ -136,13 +405,21 @@ exports.ApplicantRelationshipList = async (req, res) =>
};
//ResidenceAddressDetails List Api
exports.ResidenceAddressDetailsList = async (req, res) =>
{
try
{
ResidenceAddressDetails.findAll({where:{loan_no_id : req.query.loan_no_id }}).then(data =>
ResidenceAddressDetails.findAll({raw: true , where:{loan_no_id : req.query.loan_no_id , is_active : 1}}).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
if(data.length > 0)
{
res.send({'status':200,'message':"success",'data':data});
}
else {
res.send({'status':404,'message':"failed",'data':"No data"});
}
})
.catch(err => {
@ -156,13 +433,21 @@ exports.ResidenceAddressDetailsList = async (req, res) =>
};
//PropertyOwnership List Api
exports.PropertyOwnershipList = async (req, res) =>
{
try
{
PropertyOwnershipIncomeConsidered.findAll({where:{loan_no_id : req.query.loan_no_id }}).then(data =>
PropertyOwnershipIncomeConsidered.findAll({raw: true , where:{loan_no_id : req.query.loan_no_id , is_active : 1 }}).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
if(data.length > 0)
{
res.send({'status':200,'message':"success",'data':data});
}
else {
res.send({'status':404,'message':"failed",'data':"No data"});
}
})
.catch(err => {
@ -174,4 +459,61 @@ exports.PropertyOwnershipList = async (req, res) =>
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
} //end of try catch
};
};
//DueDiligenceCheck List Api
exports.DueDiligenceCheckList = async (req, res) =>
{
try
{
DueDiligenceCheck.findAll({raw: true , where : {entity_id : req.query.entity_id , is_active : 1}}).then(data =>
{
if(data.length > 0)
{
res.send({'status':200,'message':"success",'data':data});
}
else {
res.send({'status':404,'message':"failed",'data':"No data"});
}
})
.catch(err => {
res.send({'status':404,
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
});
} catch(err) {
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
} //end of try catch
};
//TradeReferences List Api
exports.TradeReferencesList = async (req, res) =>
{
try
{
TradeReferences.findAll({raw: true , where : {entity_id : req.query.entity_id , is_active : 1}}).then(data =>
{
if(data.length > 0)
{
res.send({'status':200,'message':"success",'data':data});
}
else {
res.send({'status':404,'message':"failed",'data':"No data"});
}
})
.catch(err => {
res.send({'status':404,
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
});
} catch(err) {
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
} //end of try catch
};

View File

@ -27,6 +27,7 @@ module.exports = (sequelize, DataTypes) => {
bureau_score: { type: DataTypes.STRING },
heir_in_business_and_on_loan_struct: { type: DataTypes.STRING },
nri: { type: DataTypes.STRING },
is_active : { type: DataTypes.INTEGER },
createdby: { type: DataTypes.INTEGER },
updatedby: { type: DataTypes.INTEGER },

View File

@ -19,6 +19,7 @@ module.exports = (sequelize, DataTypes) => {
age: { type: DataTypes.INTEGER },
gender: { type: DataTypes.STRING },
remarks: { type: DataTypes.STRING },
is_active : { type: DataTypes.INTEGER },
createdBy: { type: DataTypes.INTEGER },
updatedBy: { type: DataTypes.INTEGER },

View File

@ -6,9 +6,15 @@ module.exports = (sequelize, DataTypes) => {
}
DueDiligenceCheck.init(
{
entity_id: { type: DataTypes.INTEGER },
check_type_id: { type: DataTypes.INTEGER },
check_type: { type: DataTypes.STRING },
check_result: { type: DataTypes.STRING },
remarks: { type: DataTypes.STRING }
remarks: { type: DataTypes.STRING },
createdby: { type: DataTypes.INTEGER },
updatedby: { type: DataTypes.INTEGER },
is_active: {type : DataTypes.INTEGER}
},
{
sequelize,

View File

@ -53,6 +53,7 @@ module.exports = (sequelize, DataTypes) => {
remark_on_change__in_directorship: { type: DataTypes.STRING },
createdby: { type: DataTypes.INTEGER },
updatedby: { type: DataTypes.INTEGER },
is_active: {type : DataTypes.INTEGER}
},
{

View File

@ -23,11 +23,14 @@ module.exports = (sequelize, DataTypes) => {
rate_of_interest_per_annum: { type: DataTypes.INTEGER },
emi_per_lac_of_loan: { type: DataTypes.INTEGER },
purpose_of_loan: { type: DataTypes.INTEGER },
emi_of_loan_applied_for: { type: DataTypes.INTEGER }
emi_of_loan_applied_for: { type: DataTypes.INTEGER },
createdby: { type: DataTypes.INTEGER },
updatedby: { type: DataTypes.INTEGER },
is_active: {type : DataTypes.INTEGER}
},
{
sequelize,
tableName: 'load_details',
tableName: 'loan_details',
modelName: 'LoanDetail',
}
)

View File

@ -12,6 +12,7 @@ module.exports = (sequelize, DataTypes) => {
applicant_type: { type: DataTypes.STRING },
income_considered: { type: DataTypes.STRING },
property_owner: { type: DataTypes.STRING },
is_active : { type: DataTypes.INTEGER },
createdby: { type: DataTypes.INTEGER },
updatedby: { type: DataTypes.INTEGER },
},

View File

@ -25,6 +25,7 @@ module.exports = (sequelize, DataTypes) => {
ownership_status: { type: DataTypes.STRING },
residence_stay_period_in_years: { type: DataTypes.INTEGER },
residence_stay_period_in_bracket: { type: DataTypes.STRING },
is_active : { type: DataTypes.INTEGER },
remarks: { type: DataTypes.STRING },
createdby: { type: DataTypes.INTEGER },
updatedby: { type: DataTypes.INTEGER },

View File

@ -0,0 +1,28 @@
'use strict'
const { Model } = require('sequelize')
module.exports = (sequelize, DataTypes) => {
class TradeReferences extends Model {
}
TradeReferences.init(
{
entity_id: { type: DataTypes.INTEGER },
name: { type: DataTypes.STRING },
contact: { type: DataTypes.INTEGER },
feedback: { type: DataTypes.STRING },
feedback_result: { type: DataTypes.STRING },
createdby: { type: DataTypes.INTEGER },
updatedby: { type: DataTypes.INTEGER },
is_active: {type : DataTypes.INTEGER},
},
{
sequelize,
tableName: 'trade_references',
modelName: 'TradeReferences',
}
)
return TradeReferences
}

View File

@ -20,6 +20,21 @@ module.exports = app => {
*/
router.get("/demo", Testcontroller.Welcome);
// Loan Details List Api
/**
* @swagger
* /api/landingPageApi:
* get:
* summary: Loan Numbers Details List
* description: Get loan Number Details List by sending Los id (Primary key)
* responses:
* 200:
* description: success
*/
router.get("/landingPageApi", Entitycontroller.LoanNumberDetailsList);
// Entity Details List Api
/**
* @swagger
@ -104,6 +119,7 @@ router.get("/applicantRelationshipList", Entitycontroller.ApplicantRelationshipL
*/
router.get("/residenceAddressDetailsList", Entitycontroller.ResidenceAddressDetailsList);
// Property Ownership Income Considered Details List Api
/**
* @swagger
@ -125,6 +141,50 @@ router.get("/residenceAddressDetailsList", Entitycontroller.ResidenceAddressDeta
*/
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);
// Create new Entity Details
/**
* @swagger
@ -133,25 +193,149 @@ router.get("/propertyOwnershipList", Entitycontroller.PropertyOwnershipList);
* type: object
* properties:
* loan_no_id:
* type: string
* description: losid
* example: MW12233
* entityid:
* type: integer
* description: entityid
* description:
* example: 1
* snep_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
* fy:
* type: integer
* description: financial Year
* example: 2022
* st_type:
* type: integer
* description: statement type
* example: 2
* additional_year_type:
* type: integer
* description: additional year type
* example: 2
*/
/**
* @swagger
@ -172,10 +356,668 @@ router.get("/propertyOwnershipList", Entitycontroller.PropertyOwnershipList);
*/
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
* snep_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)
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
* 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
* 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
* 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
* 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);
// Update DueDiligenceCheck Details
/**
* @swagger
* definitions:
* updateDueDiligenceCheck:
* 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);