susee , applicant panlist api
This commit is contained in:
parent
3068111152
commit
44e59cb782
@ -869,10 +869,8 @@ exports.updatePropertyAndLtv = async (req, res) =>
|
|||||||
updatedby = req.body.updatedby;
|
updatedby = req.body.updatedby;
|
||||||
delete req.body.id;
|
delete req.body.id;
|
||||||
delete req.body.updatedby;
|
delete req.body.updatedby;
|
||||||
// update old value is_active = 0 where requested id
|
PropertyAndLtv.update(req.body,{ where: { id: id }})
|
||||||
await PropertyAndLtv.update({ updatedby : updatedby ,is_active : 0 },{ where: { id: id }});
|
.then(data =>
|
||||||
// create new entry
|
|
||||||
PropertyAndLtv.create(req.body).then(data =>
|
|
||||||
{
|
{
|
||||||
res.send({'status':200,'message':"success",'data':data});
|
res.send({'status':200,'message':"success",'data':data});
|
||||||
|
|
||||||
@ -1082,6 +1080,39 @@ exports.LoanDeatilList = async (req, res) =>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Pan List Api For Cibil
|
||||||
|
exports.ApplicantPanList = async (req, res) =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
LoanDetail.findAll({ where : { losid : req.query.losid , is_active : 1}}).then(data =>
|
||||||
|
{
|
||||||
|
sequelize.query(`SELECT loan_details.losid , applicants.pan_no AS pan , applicants.entity_type FROM loan_details JOIN applicants ON applicants.loan_no_id = '${data[0].id}' and applicants.is_active = 1 where loan_details.id = '${data[0].id}' and loan_details.is_active = 1; \
|
||||||
|
SELECT loan_details.losid , entity_details.pan_no As pan , entity_details.entity_type FROM loan_details JOIN entity_details ON entity_details.loan_no_id = '${data[0].id}' and entity_details.is_active = 1 where loan_details.id = '${data[0].id}' and loan_details.is_active = 1`)
|
||||||
|
|
||||||
|
.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 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
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -30,3 +30,9 @@ exports.Welcome = (req, res) =>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2011,120 +2011,7 @@ router.post("/updatePropertyAndLtv", Entitycontroller.updatePropertyAndLtv);
|
|||||||
router.get("/PropertyAndLtvList", Entitycontroller.PropertyAndLtvList);
|
router.get("/PropertyAndLtvList", Entitycontroller.PropertyAndLtvList);
|
||||||
|
|
||||||
|
|
||||||
// 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: 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);
|
|
||||||
|
|
||||||
|
|
||||||
// loan and ltv select api
|
// loan and ltv select api
|
||||||
@ -2332,6 +2219,123 @@ router.post("/updateOtherParameters", Entitycontroller.updateOtherParameters);
|
|||||||
router.get("/otherParametersList", Entitycontroller.OtherParametersList);
|
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: 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);
|
||||||
|
|
||||||
|
|
||||||
// LoanDeatilList List Api
|
// LoanDeatilList List Api
|
||||||
/**
|
/**
|
||||||
* @swagger
|
* @swagger
|
||||||
@ -2357,6 +2361,30 @@ router.get("/LoanDeatilList", Entitycontroller.LoanDeatilList);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user