merge:GWM
This commit is contained in:
parent
d45a09df2b
commit
c4051f3c9a
@ -672,27 +672,28 @@ exports.refreshApi = (req, res) => {
|
||||
financials_data_api_response.then(function(result){
|
||||
if(result == false)
|
||||
{
|
||||
// create skeleton here
|
||||
//financialControllerHelper.createSkeleton(losid,entityid);
|
||||
res.status(500).send({'status':500,message: "Failed" ,'data': "No data for this cin number from probe42" });
|
||||
}
|
||||
else
|
||||
{
|
||||
//filter lineitems from api responce and construct to needed format
|
||||
lineItem_data = Probe42DataMappingHelper.lineItemFetching(result);
|
||||
lineItem_data.then(function(lineItem_result){
|
||||
console.log(lineItem_result)
|
||||
|
||||
//create financial table and entityfinyear table record here
|
||||
lineItem_result.forEach((value, key)=>{
|
||||
//line item data update
|
||||
|
||||
// mapping of probe42 api lineItem with itemMaster primary key
|
||||
final_array = Probe42DataMappingHelper.lineItemMapping(value,entityid);
|
||||
final_array.then(function(update_array_data){
|
||||
console.log(update_array_data)
|
||||
|
||||
// update mapped lineitem value here
|
||||
//Probe42DataMappingHelper.lineItemUpdate(update_array_data);
|
||||
Probe42DataMappingHelper.lineItemUpdate(update_array_data);
|
||||
});//end of lineItemUpdate helper call
|
||||
|
||||
});//end of line item foreach
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
res.status(200).send({'status':200,message: "success" ,'data': "No data" });
|
||||
}, 5000);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user