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