This commit is contained in:
bitbucket 2023-08-11 11:51:44 +05:30
parent 5175982cbf
commit 65c4651913
2 changed files with 5042 additions and 22 deletions

View File

@ -15,9 +15,13 @@ exports.mainLandingPage = async (req, res) =>
if(req.query.is_loan_api_call == 0)
{
LoanDetail.findAll({raw: true ,where:{ losid:req.query.losid , is_active : 1} }).then(data =>
LoanDetail.findAll({raw: true ,where:{ losid:req.query.losid , is_active : 1},
include: [{ model: ApplicantsDetails , // Set the alias for the relationship
attributes: [
[sequelize.col('name'), 'loan_applicant_name'] // Alias for the 'name' column
] }] }).then(data =>
{
if(data.length > 0)
if(data.length > 0)
{
res.send({'status':200,'message':"success",'data':data});
}
@ -55,7 +59,11 @@ exports.mainLandingPage = async (req, res) =>
//Module Wise Completion Status Data Creation Helper Call
ModuleWiseStatusHelper.moduleCompletionStatusDataCreationHelper(loanDetailData.loginNo);
// Final Response
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"}); } })
LoanDetail.findAll({raw: true ,where:{ losid:req.query.losid , is_active : 1},
include: [{ model: ApplicantsDetails , // Set the alias for the relationship
attributes: [
[sequelize.col('name'), 'loan_applicant_name'] // Alias for the 'name' column
] }] }).then(data => { if(data.length > 0) { res.send({'status':200,'message':"success",'data':data}); } else { res.send({'status':404,'message':"failed",'data':"No data"}); } })
// Entity detail promise
var EntityKYCDetailDataInsert = new Promise(async(resolve, reject) =>
@ -170,7 +178,11 @@ exports.mainLandingPage = async (req, res) =>
else
{
logMsg.info("Los api call Failed " +req.query.losid);
LoanDetail.findAll({raw: true , where : {losid :req.query.losid , is_active : 1} }).then(data =>
LoanDetail.findAll({raw: true ,where:{ losid:req.query.losid , is_active : 1},
include: [{ model: ApplicantsDetails , // Set the alias for the relationship
attributes: [
[sequelize.col('name'), 'loan_applicant_name'] // Alias for the 'name' column
] }] }).then(data =>
{
if(data.length > 0)
{
@ -190,7 +202,11 @@ exports.mainLandingPage = async (req, res) =>
{
logMsg.info("Data already inserted " +req.query.losid);
// Final Response
LoanDetail.findAll({raw: true , where : {losid :req.query.losid , is_active : 1} }).then(data =>
LoanDetail.findAll({raw: true ,where:{ losid:req.query.losid , is_active : 1},
include: [{ model: ApplicantsDetails , // Set the alias for the relationship
attributes: [
[sequelize.col('name'), 'loan_applicant_name'] // Alias for the 'name' column
] }] }).then(data =>
{
if(data.length > 0)
{

5038
package-lock.json generated

File diff suppressed because it is too large Load Diff