browname:GWM
This commit is contained in:
parent
3bea8065c0
commit
640a8b680a
@ -390,7 +390,7 @@ exports.EnquiryAmountSplitUp =async (req, res) =>
|
||||
}
|
||||
}
|
||||
|
||||
InEnquiryDetail.findAll({where:where,order: [ ['DateOfEnquiry', 'DESC']]})
|
||||
InEnquiryDetail.findAll({raw:true,where:where,include: [ {model: InBorrowerDetail , attributes : ['ConsumerNameField1'] }],order: [ ['DateOfEnquiry', 'DESC']]})
|
||||
.then(async(data)=>{
|
||||
if(data)
|
||||
{
|
||||
@ -436,7 +436,7 @@ exports.ConsolidatedEnquiryAmountSplitUp =async (req, res) =>
|
||||
}
|
||||
}
|
||||
|
||||
InEnquiryDetail.findAll({where:where,order: [ ['DateOfEnquiry', 'DESC']]})
|
||||
InEnquiryDetail.findAll({raw:true,where:where,include: [ {model: InBorrowerDetail , attributes : ['ConsumerNameField1'] }],order: [ ['DateOfEnquiry', 'DESC']]})
|
||||
.then(async(data)=>{
|
||||
if(data)
|
||||
{
|
||||
@ -483,7 +483,7 @@ exports.SanctionAmountSplitUp =async (req, res) =>
|
||||
}
|
||||
}
|
||||
|
||||
InCreditFacility.findAll({where:where,order: [ ['DateOpenedDisbursed', 'DESC']]})
|
||||
InCreditFacility.findAll({raw:true,where:where,include: [ {model: InBorrowerDetail , attributes : ['ConsumerNameField1'] }],order: [ ['DateOpenedDisbursed', 'DESC']]})
|
||||
.then(async(data)=>{
|
||||
if(data)
|
||||
{
|
||||
@ -531,7 +531,7 @@ exports.ConsolidatedSanctionAmountSplitUp =async (req, res) =>
|
||||
}
|
||||
}
|
||||
|
||||
InCreditFacility.findAll({where:where,order: [ ['DateOpenedDisbursed', 'DESC']]})
|
||||
InCreditFacility.findAll({raw:true,where:where,include: [ {model: InBorrowerDetail , attributes : ['ConsumerNameField1'] }],order: [ ['DateOpenedDisbursed', 'DESC']]})
|
||||
.then(async(data)=>{
|
||||
if(data)
|
||||
{
|
||||
@ -826,14 +826,15 @@ exports.test = async (req, res) =>
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
x = '01-01-1996';
|
||||
data = {
|
||||
"date" : null || moment(new Date(x)).format("YYYY-MM-DD")
|
||||
}
|
||||
|
||||
|
||||
// x = '01-01-1996';
|
||||
// data = {
|
||||
// "date" : null || moment(new Date(x)).format("YYYY-MM-DD")
|
||||
// }
|
||||
|
||||
console.log(data);
|
||||
res.send({"data":data});
|
||||
// console.log(data);
|
||||
// res.send({"data":data});
|
||||
|
||||
} catch(err) {
|
||||
res.status(500).send({'status':404,
|
||||
@ -852,4 +853,4 @@ exports.test = async (req, res) =>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -37,7 +37,12 @@ module.exports = (sequelize, DataTypes) => {
|
||||
modelName: 'InCreditFacility',
|
||||
}
|
||||
)
|
||||
|
||||
InCreditFacility.associate = models => {
|
||||
InCreditFacility.hasOne(models.InBorrowerDetail, {
|
||||
foreignKey: 'ReferenceNumber',
|
||||
sourceKey : 'ReferenceNumber'
|
||||
});
|
||||
}
|
||||
|
||||
return InCreditFacility
|
||||
}
|
||||
@ -24,6 +24,11 @@ module.exports = (sequelize, DataTypes) => {
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
InEnquiryDetail.associate = models => {
|
||||
InEnquiryDetail.hasOne(models.InBorrowerDetail, {
|
||||
foreignKey: 'ReferenceNumber',
|
||||
sourceKey : 'ReferenceNumber'
|
||||
});
|
||||
}
|
||||
return InEnquiryDetail
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user