vvvw
This commit is contained in:
parent
eb6dd5dff7
commit
5175982cbf
@ -15,11 +15,7 @@ exports.mainLandingPage = async (req, res) =>
|
|||||||
|
|
||||||
if(req.query.is_loan_api_call == 0)
|
if(req.query.is_loan_api_call == 0)
|
||||||
{
|
{
|
||||||
LoanDetail.findAll({raw: true ,where:{ losid:req.query.losid , is_active : 1},
|
LoanDetail.findAll({raw: true ,where:{ losid:req.query.losid , is_active : 1} }).then(data =>
|
||||||
include: [{ model: ApplicantsDetails , // Set the alias for the relationship
|
|
||||||
attributes: [
|
|
||||||
[sequelize.col('name'), 'loan_applicant_name'] // Alias for the 'name' column
|
|
||||||
] , limit: 1 }] }).then(data =>
|
|
||||||
{
|
{
|
||||||
if(data.length > 0)
|
if(data.length > 0)
|
||||||
{
|
{
|
||||||
@ -59,11 +55,7 @@ exports.mainLandingPage = async (req, res) =>
|
|||||||
//Module Wise Completion Status Data Creation Helper Call
|
//Module Wise Completion Status Data Creation Helper Call
|
||||||
ModuleWiseStatusHelper.moduleCompletionStatusDataCreationHelper(loanDetailData.loginNo);
|
ModuleWiseStatusHelper.moduleCompletionStatusDataCreationHelper(loanDetailData.loginNo);
|
||||||
// Final Response
|
// Final Response
|
||||||
LoanDetail.findAll({raw: true , where : {losid :req.query.losid , is_active : 1},
|
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"}); } })
|
||||||
include: [{ model: ApplicantsDetails , // Set the alias for the relationship
|
|
||||||
attributes: [
|
|
||||||
[sequelize.col('name'), 'loan_applicant_name'] // Alias for the 'name' column
|
|
||||||
] , limit: 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"}); } })
|
|
||||||
|
|
||||||
// Entity detail promise
|
// Entity detail promise
|
||||||
var EntityKYCDetailDataInsert = new Promise(async(resolve, reject) =>
|
var EntityKYCDetailDataInsert = new Promise(async(resolve, reject) =>
|
||||||
@ -178,11 +170,7 @@ exports.mainLandingPage = async (req, res) =>
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
logMsg.info("Los api call Failed " +req.query.losid);
|
logMsg.info("Los api call Failed " +req.query.losid);
|
||||||
LoanDetail.findAll({raw: true , where : {losid :req.query.losid , is_active : 1},
|
LoanDetail.findAll({raw: true , where : {losid :req.query.losid , is_active : 1} }).then(data =>
|
||||||
include: [{ model: ApplicantsDetails , // Set the alias for the relationship
|
|
||||||
attributes: [
|
|
||||||
[sequelize.col('name'), 'loan_applicant_name'] // Alias for the 'name' column
|
|
||||||
] , limit: 1 }] }).then(data =>
|
|
||||||
{
|
{
|
||||||
if(data.length > 0)
|
if(data.length > 0)
|
||||||
{
|
{
|
||||||
@ -202,11 +190,7 @@ exports.mainLandingPage = async (req, res) =>
|
|||||||
{
|
{
|
||||||
logMsg.info("Data already inserted " +req.query.losid);
|
logMsg.info("Data already inserted " +req.query.losid);
|
||||||
// Final Response
|
// Final Response
|
||||||
LoanDetail.findAll({raw: true , where : {losid :req.query.losid , is_active : 1},
|
LoanDetail.findAll({raw: true , where : {losid :req.query.losid , is_active : 1} }).then(data =>
|
||||||
include: [{ model: ApplicantsDetails , // Set the alias for the relationship
|
|
||||||
attributes: [
|
|
||||||
[sequelize.col('name'), 'loan_applicant_name'] // Alias for the 'name' column
|
|
||||||
] , limit: 1 }] }).then(data =>
|
|
||||||
{
|
{
|
||||||
if(data.length > 0)
|
if(data.length > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user