susee
This commit is contained in:
parent
c627ed8e7d
commit
91de5e665c
@ -1,5 +1,5 @@
|
||||
const { raw } = require('body-parser');
|
||||
const { sequelize , LoanDetail , EntityDetails , ApplicantsDetails , ApplicantsRelationship , ResidenceAddressDetails , PropertyOwnershipIncomeConsidered , DueDiligenceCheck , TradeReferences , CheckTypeMaster , EnquiriesAndDisbursements , PropertyAndLtv , ATNWrelatedInputs , SalesPD , ATNWrelatedInputMaster ,ATNWrelationship , OtherParameterMaster ,OtherParameterMasterValue , OtherParameterRelationship , OtherParameters , ATNErelatedInputSubVal , DataFromLos , FormulaMaster } = require('../models')
|
||||
const { sequelize , LoanDetail , EntityDetails , ApplicantsDetails , ApplicantsRelationship , ResidenceAddressDetails , PropertyOwnershipIncomeConsidered , DueDiligenceCheck , TradeReferences , CheckTypeMaster , EnquiriesAndDisbursements , PropertyAndLtv , ATNWrelatedInputs , SalesPD , ATNWrelatedInputMaster ,ATNWrelationship , OtherParameterMaster ,OtherParameterMasterValue , OtherParameterRelationship , OtherParameters , ATNErelatedInputSubVal , DataFromLos , FormulaMaster , LoanAndLtvMaster , EntityApplicantMaster } = require('../models')
|
||||
const { logMsg } = require('../services/logger.js');
|
||||
|
||||
|
||||
@ -1160,7 +1160,7 @@ exports.FormulaMasterList = async (req, res) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
FormulaMaster.findAll({raw: true , where : { is_active : 1}}).then(data =>
|
||||
FormulaMaster.findAll({raw: true , where : { is_active : 1}}).then(data =>
|
||||
{
|
||||
if(data.length > 0)
|
||||
{
|
||||
@ -1186,6 +1186,34 @@ exports.FormulaMasterList = async (req, res) =>
|
||||
|
||||
|
||||
|
||||
// Master List Api
|
||||
exports.MainAppMasterDataList = async (req, res) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
FormulaMasterData = await FormulaMaster.findAll({ where : { is_active : 1}});
|
||||
EntityApplicantMasterData = await EntityApplicantMaster.findAll({ where : { is_active : 1}});
|
||||
LoanAndLtvMasterData = await LoanAndLtvMaster.findAll({ where : { is_active : 1}});
|
||||
|
||||
if(FormulaMasterData.length > 0 || EntityApplicantMasterData.length > 0 || LoanAndLtvMasterData.length > 0 )
|
||||
{
|
||||
data = { 'FormulaMasterData': FormulaMasterData ,'EntityApplicantMasterData': EntityApplicantMasterData ,'LoanAndLtvMasterData': LoanAndLtvMasterData }
|
||||
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 inserting statements." ,'data': "No data" });
|
||||
} //end of try catch
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -17,22 +17,3 @@ exports.Welcome = (req, res) =>
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -20,8 +20,5 @@ module.exports = (sequelize, DataTypes) => {
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
return FormulaMaster
|
||||
}
|
||||
@ -14,7 +14,7 @@ module.exports = (sequelize, DataTypes) => {
|
||||
sourcing_channel_name: { type: DataTypes.INTEGER },
|
||||
proposal: { type: DataTypes.INTEGER },
|
||||
sanction_date_of_earlier_exposure: { type: DataTypes.INTEGER },
|
||||
sanction_amount_of_earlier_exposure: { type: DataTypes.INTEGER },
|
||||
sanction_amount_of_earlier_exposure: { type: DataTypes.STRING },
|
||||
current_outstnd_bal_of_earlier_exposure: { type: DataTypes.INTEGER },
|
||||
emi_of_earlier_exposure: { type: DataTypes.INTEGER },
|
||||
additional_loan_amnt_applied_for: { type: DataTypes.INTEGER },
|
||||
|
||||
@ -21,7 +21,7 @@ module.exports = app => {
|
||||
router.get("/demo", Testcontroller.Welcome);
|
||||
|
||||
|
||||
// router.get("/excel", Testcontroller.excel);
|
||||
// router.get("/copy", Testcontroller.copy);
|
||||
|
||||
// entity_applicant_name list for banking module
|
||||
/**
|
||||
@ -2422,6 +2422,22 @@ 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);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
29
package-lock.json
generated
29
package-lock.json
generated
@ -11,9 +11,11 @@
|
||||
"dependencies": {
|
||||
"body-parser": "^1.19.0",
|
||||
"cors": "^2.8.5",
|
||||
"date-fns": "^2.28.0",
|
||||
"dist": "^0.1.2",
|
||||
"dotenv": "^10.0.0",
|
||||
"express": "^4.17.1",
|
||||
"formula-yearfrac": "^0.0.1",
|
||||
"log4js": "^6.3.0",
|
||||
"mssql": "^7.2.0",
|
||||
"request": "^2.88.2",
|
||||
@ -1463,6 +1465,18 @@
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/date-fns": {
|
||||
"version": "2.28.0",
|
||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz",
|
||||
"integrity": "sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw==",
|
||||
"engines": {
|
||||
"node": ">=0.11"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/date-fns"
|
||||
}
|
||||
},
|
||||
"node_modules/date-format": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.3.tgz",
|
||||
@ -1876,6 +1890,11 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/formula-yearfrac": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/formula-yearfrac/-/formula-yearfrac-0.0.1.tgz",
|
||||
"integrity": "sha512-DfCHwfCo6fID6Sqis4YUSemTw+1QJFMpGGSDzJpiwovPoWrBJG/mxyPjl5jFv++6zeEPe/IA1nYVQAlWlLDqvg=="
|
||||
},
|
||||
"node_modules/forwarded": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
||||
@ -6027,6 +6046,11 @@
|
||||
"assert-plus": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"date-fns": {
|
||||
"version": "2.28.0",
|
||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz",
|
||||
"integrity": "sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw=="
|
||||
},
|
||||
"date-format": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.3.tgz",
|
||||
@ -6348,6 +6372,11 @@
|
||||
"mime-types": "^2.1.12"
|
||||
}
|
||||
},
|
||||
"formula-yearfrac": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/formula-yearfrac/-/formula-yearfrac-0.0.1.tgz",
|
||||
"integrity": "sha512-DfCHwfCo6fID6Sqis4YUSemTw+1QJFMpGGSDzJpiwovPoWrBJG/mxyPjl5jFv++6zeEPe/IA1nYVQAlWlLDqvg=="
|
||||
},
|
||||
"forwarded": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
||||
|
||||
@ -12,9 +12,11 @@
|
||||
"dependencies": {
|
||||
"body-parser": "^1.19.0",
|
||||
"cors": "^2.8.5",
|
||||
"date-fns": "^2.28.0",
|
||||
"dist": "^0.1.2",
|
||||
"dotenv": "^10.0.0",
|
||||
"express": "^4.17.1",
|
||||
"formula-yearfrac": "^0.0.1",
|
||||
"log4js": "^6.3.0",
|
||||
"mssql": "^7.2.0",
|
||||
"request": "^2.88.2",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user