susee , landing page api & loan detail api
This commit is contained in:
parent
12b0084d9a
commit
7eb804d455
@ -483,12 +483,12 @@ exports.updateEnquiriesAndDisbursementsDetails = async (req, res) =>
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//LoanNumberDetails List Api
|
//landingPageApi(All Loan detail list ) List Api
|
||||||
exports.LoanNumberDetailsList = async (req, res) =>
|
exports.landingPageApi = async (req, res) =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
LoanDetail.findAll({raw: true , where : { losid : req.query.losid , is_active : 1}}).then(data =>
|
LoanDetail.findAll({raw: true , where : { is_active : 1}}).then(data =>
|
||||||
{
|
{
|
||||||
if(data.length > 0)
|
if(data.length > 0)
|
||||||
{
|
{
|
||||||
@ -1048,6 +1048,35 @@ exports.OtherParametersList = async (req, res) =>
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//LoanDeatilList List Api
|
||||||
|
exports.LoanDeatilList = async (req, res) =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
LoanDetail.findAll({raw: true , where : { losid : req.query.losid , 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
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -18,20 +18,36 @@ exports.Welcome = (req, res) =>
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// IF(
|
// IF(
|
||||||
// AND( variance_in_mv1_and_mv2 > 10% OR (mark_valuation_1 = "",mark_valuation_1 = 0, mark_valuation_2 ="",mark_valuation_2 =0,third_val_not_req="",third_val_not_req=0)),
|
// AND( variance_in_mv1_and_mv2 > 10% , OR (mark_valuation_1 = "",mark_valuation_1 = 0, mark_valuation_2 ="",mark_valuation_2 =0,third_val_not_req="",third_val_not_req=0) ),
|
||||||
// "Inputs Required",
|
// "Inputs Required",
|
||||||
|
|
||||||
// IF(
|
// IF(
|
||||||
// OR( override="", override ="Average"),
|
// OR( override="", override ="Average"),
|
||||||
// IF( variance_in_mv1_and_mv2 <= 10% ,( mark_valuation_1 + mark_valuation_2 )/2 ,
|
// IF( variance_in_mv1_and_mv2 <= 10% ,
|
||||||
// ( third_val_not_req + mark_valuation_2 + mark_valuation_1 - MAX(third_val_not_req , mark_valuation_2, mark_valuation_1))/2),
|
// ( mark_valuation_1 + mark_valuation_2 )/2 ,
|
||||||
|
// ( third_val_not_req + mark_valuation_2 + mark_valuation_1 - MAX(third_val_not_req , mark_valuation_2, mark_valuation_1))/2),
|
||||||
|
|
||||||
// IF( override ="Lower",IF(variance_in_mv1_and_mv2 <= 10% ,
|
// IF( override ="Lower",
|
||||||
|
// IF(variance_in_mv1_and_mv2 <= 10% ,
|
||||||
// MIN(mark_valuation_1, mark_valuation_2 ),
|
// MIN(mark_valuation_1, mark_valuation_2 ),
|
||||||
// MIN(third_val_not_req ,mark_valuation_2,mark_valuation_1)),
|
// MIN(third_val_not_req ,mark_valuation_2,mark_valuation_1)),
|
||||||
|
|
||||||
// IF( override ="Higher",IF(variance_in_mv1_and_mv2 <= 10% ,
|
// IF( override ="Higher"
|
||||||
|
// ,IF(variance_in_mv1_and_mv2 <= 10% ,
|
||||||
// MAX(mark_valuation_1,mark_valuation_2),
|
// MAX(mark_valuation_1,mark_valuation_2),
|
||||||
// MAX(third_val_not_req ,mark_valuation_2,mark_valuation_1))))
|
// MAX(third_val_not_req ,mark_valuation_2,mark_valuation_1))))
|
||||||
// )
|
// )
|
||||||
|
|||||||
@ -6,7 +6,7 @@ module.exports = (sequelize, DataTypes) => {
|
|||||||
}
|
}
|
||||||
LoanDetail.init(
|
LoanDetail.init(
|
||||||
{
|
{
|
||||||
losid: { type: DataTypes.INTEGER },
|
losid: { type: DataTypes.STRING },
|
||||||
// loan_no: { type: DataTypes.INTEGER },
|
// loan_no: { type: DataTypes.INTEGER },
|
||||||
product : { type: DataTypes.STRING },
|
product : { type: DataTypes.STRING },
|
||||||
date_of_login: { type: DataTypes.INTEGER },
|
date_of_login: { type: DataTypes.INTEGER },
|
||||||
|
|||||||
@ -67,26 +67,18 @@ router.get("/entityApplicantNameList", Entitycontroller.EntityApplicantNameList)
|
|||||||
router.get("/MainApplicantDetailsList", Entitycontroller.MainApplicantDetailsList);
|
router.get("/MainApplicantDetailsList", Entitycontroller.MainApplicantDetailsList);
|
||||||
|
|
||||||
|
|
||||||
// Loan Details List Api
|
// landingPageApi List Api
|
||||||
/**
|
/**
|
||||||
* @swagger
|
* @swagger
|
||||||
* /api/landingPageApi:
|
* /api/landingPageApi:
|
||||||
* get:
|
* get:
|
||||||
* summary: Loan Numbers Details List
|
* summary: Loan Numbers Details List
|
||||||
* description: Get loan Number Details List
|
* description: Get loan Number Details List
|
||||||
* parameters:
|
|
||||||
* - in: query
|
|
||||||
* name: losid
|
|
||||||
* schema:
|
|
||||||
* type: string
|
|
||||||
* required: true
|
|
||||||
* description: id of the entity Details (primart key of entity)
|
|
||||||
* example: MW112233
|
|
||||||
* responses:
|
* responses:
|
||||||
* 200:
|
* 200:
|
||||||
* description: success
|
* description: success
|
||||||
*/
|
*/
|
||||||
router.get("/landingPageApi", Entitycontroller.LoanNumberDetailsList);
|
router.get("/landingPageApi", Entitycontroller.landingPageApi);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -2332,6 +2324,28 @@ router.post("/updateOtherParameters", Entitycontroller.updateOtherParameters);
|
|||||||
router.get("/otherParametersList", Entitycontroller.OtherParametersList);
|
router.get("/otherParametersList", Entitycontroller.OtherParametersList);
|
||||||
|
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user