loanApiIntegration:GWM
This commit is contained in:
parent
ccacbeb2bf
commit
9757731cb0
@ -739,11 +739,11 @@ exports.LandingPageDetailsList = async (req, res) =>
|
||||
ResData.lstApplicantKYCDetail.forEach(async(value,index,array) => {
|
||||
if (value.kycType.trim() == "Non-Individual")
|
||||
{
|
||||
lstEntityKYCDetailObj = { losid:req.query.losid, pan_no : value.panNo,entity_type : value.kycType.trim() }
|
||||
lstEntityKYCDetailObj = { losid:req.query.losid, PAN : value.panNo,entity_type : value.kycType.trim() }
|
||||
await PanList.push(lstEntityKYCDetailObj);
|
||||
} else if (value.kycType.trim() == "Individual")
|
||||
{
|
||||
lstApplicantKYCDetailObj = { losid:req.query.losid, pan_no : value.panNo,entity_type : value.kycType.trim(),}
|
||||
lstApplicantKYCDetailObj = { losid:req.query.losid, PAN : value.panNo,entity_type : value.kycType.trim(),}
|
||||
await PanList.push(lstApplicantKYCDetailObj);
|
||||
}
|
||||
});
|
||||
@ -753,6 +753,7 @@ exports.LandingPageDetailsList = async (req, res) =>
|
||||
|
||||
if(PanList.length != 0)
|
||||
{
|
||||
console.log(PanList);
|
||||
var CibilDataInsert = new Promise(async(resolve, reject) => {
|
||||
PanList.forEach(async(PanListValue,PanListIndex,PanListArray) => {
|
||||
|
||||
@ -760,7 +761,7 @@ exports.LandingPageDetailsList = async (req, res) =>
|
||||
if(PanListValue.entity_type == "Individual"){ CibilType = 1; }else if(PanListValue.entity_type == "Non-Individual"){CibilType = 2;}
|
||||
await Object.assign(PanListValue, {cibil_type:CibilType})
|
||||
|
||||
BorrowerDetailData = await InBorrowerDetail.findOne({where:{losid:PanListValue.losid , PAN:PanListValue.pan_no ,cibil_type:CibilType}});
|
||||
BorrowerDetailData = await InBorrowerDetail.findOne({where:{losid:PanListValue.losid , PAN:PanListValue.PAN ,cibil_type:CibilType}});
|
||||
if(BorrowerDetailData)
|
||||
{
|
||||
//skip data insertion for this case
|
||||
@ -771,6 +772,7 @@ exports.LandingPageDetailsList = async (req, res) =>
|
||||
{
|
||||
//create Intermediate table borrower details (only losid,pan,cibil_type,entity_type)
|
||||
await InBorrowerDetail.create(PanListValue).then(async(PanListData)=>{
|
||||
console.log(PanListData);
|
||||
//call cibil data api and insert cibil data in to input tables
|
||||
if(PanListData.cibil_type == 1)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user