merge:GWM
This commit is contained in:
parent
a25a70714a
commit
26a1a9b9ba
@ -130,8 +130,9 @@ exports.FinantialsSummary = async (req, res) => {
|
|||||||
taskid.then(function(result){
|
taskid.then(function(result){
|
||||||
formVariable = camundaHelper.financialsFormVariables(result);
|
formVariable = camundaHelper.financialsFormVariables(result);
|
||||||
formVariable.then(function(form_result){
|
formVariable.then(function(form_result){
|
||||||
camunda_status = JSON.parse(form_result);
|
formVariableResult = JSON.parse(form_result);
|
||||||
res.send({'status':200,'message':"success",'data':{"years" : three_years_data ,"add_new_finyear_flag" : add_new_FY_flag,status:camunda_status, "summary" : summary } });
|
if(formVariableResult.type){ camunda_status = {"process_status":"NULL"}; } else { camunda_status =JSON.parse(form_result); }
|
||||||
|
res.send({'status':200,'message':"success",'data':{"years" : three_years_data ,"add_new_finyear_flag" : add_new_FY_flag , status:camunda_status, "summary" : summary } });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
//res.send({'status':200,'message':"success",'data':{"years" : three_years_data ,"add_new_finyear_flag" : add_new_FY_flag, "summary" : result } });
|
//res.send({'status':200,'message':"success",'data':{"years" : three_years_data ,"add_new_finyear_flag" : add_new_FY_flag, "summary" : result } });
|
||||||
@ -149,8 +150,9 @@ exports.FinantialsSummary = async (req, res) => {
|
|||||||
taskid.then(function(result){
|
taskid.then(function(result){
|
||||||
formVariable = camundaHelper.financialsFormVariables(result);
|
formVariable = camundaHelper.financialsFormVariables(result);
|
||||||
formVariable.then(function(form_result){
|
formVariable.then(function(form_result){
|
||||||
camunda_status = JSON.parse(form_result);
|
formVariableResult = JSON.parse(form_result);
|
||||||
res.send({'status':200,'message':"success",'data':{"years" : four_years_data ,"add_new_finyear_flag" : add_new_FY_flag,status:camunda_status, "summary" : summary } });
|
if(formVariableResult.type){ camunda_status = {"process_status":"NULL"}; } else { camunda_status =JSON.parse(form_result); }
|
||||||
|
res.send({'status':200,'message':"success",'data':{"years" : four_years_data ,"add_new_finyear_flag" : add_new_FY_flag , status:camunda_status, "summary" : summary } });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
//res.send({'status':200,'message':"success",'data':{"years" : four_years_data ,"add_new_finyear_flag" : add_new_FY_flag, "summary" : result } });
|
//res.send({'status':200,'message':"success",'data':{"years" : four_years_data ,"add_new_finyear_flag" : add_new_FY_flag, "summary" : result } });
|
||||||
@ -803,3 +805,4 @@ exports.camunda = async (req, res) => {
|
|||||||
message: err.message || "Some error occurred while inserting statements." ,'data': "No data"
|
message: err.message || "Some error occurred while inserting statements." ,'data': "No data"
|
||||||
}); }
|
}); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,8 @@ module.exports = app => {
|
|||||||
var router = require("express").Router();
|
var router = require("express").Router();
|
||||||
|
|
||||||
|
|
||||||
router.get("/camunda", financials.camunda);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @swagger
|
* @swagger
|
||||||
* /api/ConsolidatedSummary:
|
* /api/ConsolidatedSummary:
|
||||||
|
|||||||
@ -49,16 +49,12 @@ const URL = process.env.CAMUNDA_URL
|
|||||||
body: myJSONObject
|
body: myJSONObject
|
||||||
}, function (error, response, body){
|
}, function (error, response, body){
|
||||||
let data = body;
|
let data = body;
|
||||||
|
task_id = data[0].id;
|
||||||
if(data.length)
|
if(task_id)
|
||||||
{
|
{
|
||||||
task_id = data[0].id;
|
|
||||||
resolve(task_id);
|
resolve(task_id);
|
||||||
}
|
}
|
||||||
else
|
else{ resolve(false); }
|
||||||
{
|
|
||||||
resolve(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -75,7 +71,7 @@ const URL = process.env.CAMUNDA_URL
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
const task_complete_url = URL+"task/"+taskid+"/complete";
|
const task_complete_url = URL+"/task/"+taskid+"/complete";
|
||||||
const myJSONObject = {"variables":{"review_status":{"value":true}}};
|
const myJSONObject = {"variables":{"review_status":{"value":true}}};
|
||||||
request({
|
request({
|
||||||
url: task_complete_url,
|
url: task_complete_url,
|
||||||
@ -83,6 +79,7 @@ const URL = process.env.CAMUNDA_URL
|
|||||||
json: true,
|
json: true,
|
||||||
body: myJSONObject
|
body: myJSONObject
|
||||||
}, function (error, response, body){
|
}, function (error, response, body){
|
||||||
|
|
||||||
return body;
|
return body;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user