excel:GWM
This commit is contained in:
parent
dff610f8df
commit
473ca2f44a
@ -28,11 +28,11 @@ exports.ImportExcelData = async (req, res , filename) =>
|
||||
if(SheetLevelData.length != 0)
|
||||
{
|
||||
if(sheetName.toUpperCase() == 'PROPRIETORSHIP'){
|
||||
where_Condition = { losid : losid , entity_type : 'PROPRIETORSHIP' }
|
||||
where_Condition = { losid : losid , entity_type : 'PROPRIETORSHIP', probe42_data_status: 2 }
|
||||
}else if(sheetName.toUpperCase() == 'PARTNERSHIP'){
|
||||
where_Condition = { losid : losid , entity_type : 'PARTNERSHIP' }
|
||||
where_Condition = { losid : losid , entity_type : 'PARTNERSHIP', probe42_data_status: 2 }
|
||||
}else{
|
||||
where_Condition = { losid : losid , cin : sheetName }
|
||||
where_Condition = { losid : losid , cin : sheetName , probe42_data_status: 2 }
|
||||
}
|
||||
|
||||
EntityData = await Entities.findOne({raw:true, where: where_Condition }).catch(err => {});
|
||||
@ -89,11 +89,15 @@ exports.ImportExcelData = async (req, res , filename) =>
|
||||
logMsg.info("Value not updated for - EntityId : "+value.entity_id+" , FY : "+value.fy+",ItemId : "+value.itemid);
|
||||
}
|
||||
|
||||
if (key === array.length -1) { resolve(); }
|
||||
if (key === array.length -1) { resolve(DataArray); }
|
||||
});
|
||||
});
|
||||
FinancialsDataUpdate.then(async(data)=>
|
||||
{
|
||||
data.forEach(async(value, key , array)=>{
|
||||
var entity_id = value[0].entity_id;
|
||||
await Financials.update( {manual_data_status:1},{where:{id:entity_id}} ).catch(err=>{ logMsg.info(err); });
|
||||
});
|
||||
res.send({'status':200,'message':"success",'data':"No data"});
|
||||
});
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ module.exports = (sequelize, DataTypes) => {
|
||||
activity_group: { type: DataTypes.STRING },
|
||||
biz_act_desc: { type: DataTypes.STRING },
|
||||
probe42_data_status : {type : DataTypes.INTEGER},
|
||||
manual_data_status : {type : DataTypes.INTEGER},
|
||||
is_verified : {type : DataTypes.INTEGER},
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER },
|
||||
|
||||
Loading…
Reference in New Issue
Block a user