susee
This commit is contained in:
parent
ece5bf1fb1
commit
aa90979106
@ -1,5 +1,5 @@
|
|||||||
const { sequelize,EntityApplicantMaster,StateMaster,CityMaster,PinMaster,ChecktypeCheckresultRelationMaster
|
const { sequelize,EntityApplicantMaster,StateMaster,CityMaster,PinMaster,ChecktypeCheckresultRelationMaster
|
||||||
,DueDiligenceCheck,CheckResultMaster,CheckTypeMaster} = require('../models')
|
,DueDiligenceCheck,CheckResultMaster,CheckTypeMaster,LoanAndLtvMaster} = require('../models')
|
||||||
const { logMsg } = require('../services/logger.js');
|
const { logMsg } = require('../services/logger.js');
|
||||||
|
|
||||||
|
|
||||||
@ -191,6 +191,30 @@ const { logMsg } = require('../services/logger.js');
|
|||||||
} //end of try catch
|
} //end of try catch
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// select pin master data
|
||||||
|
exports.loanAndLtvMaster = async (req, res) =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await LoanAndLtvMaster.findAll({ where : { "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 fetching masterdata." ,'data': "No data" });
|
||||||
|
});
|
||||||
|
|
||||||
|
} catch(err) {
|
||||||
|
res.send({'status':404,
|
||||||
|
message: err.message || "Some error occurred while fetching masterdata." ,'data': "No data"
|
||||||
|
});
|
||||||
|
} //end of try catch
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// // select pin master data
|
// // select pin master data
|
||||||
|
|||||||
24
app/models/LoanAndLtvMaster.js
Normal file
24
app/models/LoanAndLtvMaster.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
'use strict'
|
||||||
|
const { Model } = require('sequelize')
|
||||||
|
module.exports = (sequelize, DataTypes) => {
|
||||||
|
class LoanAndLtvMaster extends Model {
|
||||||
|
|
||||||
|
}
|
||||||
|
LoanAndLtvMaster.init(
|
||||||
|
{
|
||||||
|
master_name : { type: DataTypes.STRING },
|
||||||
|
value: { type: DataTypes.STRING },
|
||||||
|
is_active: { type: DataTypes.INTEGER }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sequelize,
|
||||||
|
tableName: 'loan_details_master',
|
||||||
|
modelName: 'LoanAndLtvMaster',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return LoanAndLtvMaster
|
||||||
|
}
|
||||||
@ -20,6 +20,7 @@ module.exports = app => {
|
|||||||
*/
|
*/
|
||||||
router.get("/demo", Testcontroller.Welcome);
|
router.get("/demo", Testcontroller.Welcome);
|
||||||
|
|
||||||
|
|
||||||
// router.get("/excel", Testcontroller.excel);
|
// router.get("/excel", Testcontroller.excel);
|
||||||
|
|
||||||
// entity_applicant_name list for banking module
|
// entity_applicant_name list for banking module
|
||||||
@ -2229,6 +2230,21 @@ router.post("/createLoanDetail", Entitycontroller.createLoanDetail);
|
|||||||
*/
|
*/
|
||||||
router.post("/updateLoanDetail", Entitycontroller.updateLoanDetail);
|
router.post("/updateLoanDetail", Entitycontroller.updateLoanDetail);
|
||||||
|
|
||||||
|
|
||||||
|
// loan and ltv select api
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @swagger
|
||||||
|
* /api/loanAndLtvMaster:
|
||||||
|
* get:
|
||||||
|
* summary: Dropdown loan And property & Ltv Master Api
|
||||||
|
* description: All master data for dropdown value
|
||||||
|
* responses:
|
||||||
|
* 200:
|
||||||
|
* description: success
|
||||||
|
*/
|
||||||
|
router.get("/loanAndLtvMaster", Mastercontroller.loanAndLtvMaster);
|
||||||
|
|
||||||
// routes started here
|
// routes started here
|
||||||
app.use('/api', router);
|
app.use('/api', router);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user