query:param:GWM
This commit is contained in:
parent
1210f84343
commit
c35d3adfad
@ -37,7 +37,7 @@ exports.MenuList = async (req, res) => {
|
|||||||
//findAll({ where :{is_active : 1} ,include : { association: 'sectionsmasterData' } });
|
//findAll({ where :{is_active : 1} ,include : { association: 'sectionsmasterData' } });
|
||||||
//findAll({ where :{is_active : 1} , include: { all: true, nested: true , where :{is_active : 1} }});
|
//findAll({ where :{is_active : 1} , include: { all: true, nested: true , where :{is_active : 1} }});
|
||||||
try {
|
try {
|
||||||
const losid = req.params.losid
|
const losid = req.query.losid
|
||||||
const MasterData = await Statementsmaster.findAll({
|
const MasterData = await Statementsmaster.findAll({
|
||||||
where :{is_active : 1} ,
|
where :{is_active : 1} ,
|
||||||
attributes: ['id', 'statement', 'is_active'],
|
attributes: ['id', 'statement', 'is_active'],
|
||||||
@ -81,7 +81,7 @@ exports.MenuList = async (req, res) => {
|
|||||||
|
|
||||||
// FinantialsSummary
|
// FinantialsSummary
|
||||||
exports.FinantialsSummary = async (req, res) => {
|
exports.FinantialsSummary = async (req, res) => {
|
||||||
const id = req.params.id
|
const id = req.query.entityid
|
||||||
|
|
||||||
Financials.findAll({where : { entity_id : id } ,attributes: ['fy'], group: ['fy'] , order: [['fy', 'DESC']] })
|
Financials.findAll({where : { entity_id : id } ,attributes: ['fy'], group: ['fy'] , order: [['fy', 'DESC']] })
|
||||||
.then(data => {
|
.then(data => {
|
||||||
@ -113,11 +113,11 @@ exports.FinantialsSummary = async (req, res) => {
|
|||||||
|
|
||||||
// Broken period list api
|
// Broken period list api
|
||||||
exports.BrokenPeriodsList = (req, res) => {
|
exports.BrokenPeriodsList = (req, res) => {
|
||||||
const entityid = req.params.entityid
|
const entityid = req.query.entityid
|
||||||
try {
|
try {
|
||||||
Brokenperiods.findOne({where : { entity_id : entityid } })
|
Brokenperiods.findOne({where : { entity_id : entityid } })
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log(data);
|
|
||||||
if(data)
|
if(data)
|
||||||
{res.send({'status':200,'message':"success",'data':data});}
|
{res.send({'status':200,'message':"success",'data':data});}
|
||||||
else{res.send({'status':404,'message':"failed",'data':"nodata"});}
|
else{res.send({'status':404,'message':"failed",'data':"nodata"});}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ module.exports = (sequelize, DataTypes) => {
|
|||||||
months: { type: DataTypes.INTEGER },
|
months: { type: DataTypes.INTEGER },
|
||||||
cy: { type: DataTypes.INTEGER },
|
cy: { type: DataTypes.INTEGER },
|
||||||
py: { type: DataTypes.INTEGER },
|
py: { type: DataTypes.INTEGER },
|
||||||
variation: { type: DataTypes.INTEGER },
|
variation: { type: DataTypes.STRING },
|
||||||
createdby: { type: DataTypes.INTEGER },
|
createdby: { type: DataTypes.INTEGER },
|
||||||
updatedby: { type: DataTypes.INTEGER },
|
updatedby: { type: DataTypes.INTEGER },
|
||||||
|
|
||||||
|
|||||||
@ -20,13 +20,13 @@ module.exports = app => {
|
|||||||
router.post("/BrokenPeriods", financials.BrokenPeriods);
|
router.post("/BrokenPeriods", financials.BrokenPeriods);
|
||||||
|
|
||||||
// get financials summary
|
// get financials summary
|
||||||
router.get("/FinantialsSummary/:id", financials.FinantialsSummary);
|
router.get("/FinantialsSummary", financials.FinantialsSummary);
|
||||||
|
|
||||||
// get menu list
|
// get menu list
|
||||||
router.get("/MenuList/:losid", financials.MenuList);
|
router.get("/MenuList", financials.MenuList);
|
||||||
|
|
||||||
// Retrieve all Broken periods
|
// Retrieve all Broken periods
|
||||||
router.get("/BrokenPeriodsList/:entityid", financials.BrokenPeriodsList);
|
router.get("/BrokenPeriodsList", financials.BrokenPeriodsList);
|
||||||
|
|
||||||
// fetching all master data
|
// fetching all master data
|
||||||
router.get("/MasterDatas", financials.MasterDatas);
|
router.get("/MasterDatas", financials.MasterDatas);
|
||||||
@ -36,7 +36,7 @@ module.exports = app => {
|
|||||||
|
|
||||||
// update financials data
|
// update financials data
|
||||||
router.post("/updateFinancials", financials.updateFinancials);
|
router.post("/updateFinancials", financials.updateFinancials);
|
||||||
//router.get("/test", financials.test);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user