suseendhiran

This commit is contained in:
suseendhiran17 2023-01-05 20:03:19 +05:30
parent 6aceef8b87
commit 5208f4ff9b

View File

@ -65,7 +65,7 @@ exports.PullCreditPdData = async (req, res) => {
Object.assign(obj , {pd_id : PDID.dataValues.pd_id} ); Object.assign(obj , {pd_id : PDID.dataValues.pd_id} );
var index = table_name[0].table_name; var index = table_name[0].table_name;
var tableName = arr[index]; var tableName = arr[index];
tableName.create(obj);logMsg.info(OverallKey+" insert success ,PdId= "+PDID.dataValues.pd_id); await tableName.create(obj);logMsg.info(OverallKey+" insert success ,PdId= "+PDID.dataValues.pd_id);
} }
} }
res.send({'status':200,'message':"success"}); res.send({'status':200,'message':"success"});
@ -248,43 +248,43 @@ exports.GetCreditPdData = async (req, res) =>
// { // {
// try // try
// { // {
// applicantDetails = await Credit_PdHelper.MainApplicantDetails(req.query.losid); // // applicantDetails = await Credit_PdHelper.MainApplicantDetails(req.query.losid);
// MainApplicantDetails = JSON.parse(applicantDetails); // // MainApplicantDetails = JSON.parse(applicantDetails);
// if(MainApplicantDetails.status == 200) // // if(MainApplicantDetails.status == 200)
// { // // {
// CreditGeneralInformation.findAll({ where : { pd_id :409,is_active : 1}, // CreditGeneralInformation.findAll({ where : { pd_id :410,is_active : 1},
// include : [ // include : [
// {model: CreditAddressDetail }, {model: CreditFuturePlans }, // {model: CreditAddressDetail }, {model: CreditFuturePlans },
// {model : CreditBorrowerAndGuarantorDetails }, // {model : CreditBorrowerAndGuarantorDetails },
// {model: CreditBusinessAndPersonalBankingDetails }, {model: BusinessAsset }, // {model: CreditBusinessAndPersonalBankingDetails }, {model: BusinessAsset },
// {model: CreditFinancialInformation }, {model: CreditKeyShareholder }, // {model: CreditFinancialInformation }, {model: CreditKeyShareholder },
// {model: CreditKeyProductBusinessContribution }, {model: EmployeeStrength }, // {model: CreditKeyProductBusinessContribution }, {model: EmployeeStrength },
// {model: ClientDetail }, {model: StockDetail }, // {model: ClientDetail }, {model: StockDetail },
// {model: CreditExistingLoanObligation }, // {model: CreditExistingLoanObligation },
// {model: FamilyMemberInvolvedInBusiness }, // {model: FamilyMemberInvolvedInBusiness },
// {model : CreditManager }, // {model : CreditManager },
// {model: Photograph }, // {model: Photograph },
// {model: CreditFinalRemarks }, {model: CreditLoanDetail }, // {model: CreditFinalRemarks }, {model: CreditLoanDetail },
// {model: CreditGeneralBusinessInformation }, // {model: CreditGeneralBusinessInformation },
// {model: SupplierDetail } // {model: SupplierDetail }
// ] // ]
// }) // })
// .then((data)=>{ // .then((data)=>{
// if (data.length > 0) // if (data.length > 0)
// { // {
// res.send({'status':200,'message':"success",'data':data}); // res.send({'status':200,'message':"success",'data':data});
// } // }
// else // else
// { // {
// res.send({'status':404,'message':"failed",'data':"No data"}); // res.send({'status':404,'message':"failed",'data':"No data"});
// } // }
// }) // })
// } // // }
// else // // else
// { // // {
// res.send({'status':404,'message':"failed",'data':"No data"}); // // res.send({'status':404,'message':"failed",'data':"No data"});
// } // // }
// } catch(err) { // } catch(err) {
// res.status(500).send({'status':404, // res.status(500).send({'status':404,