feat(ocmeserver): the server was just migrated so it can be upgraded to lstv2

This commit is contained in:
2025-03-17 16:13:58 -05:00
parent 491de26a0b
commit e258aaead9
8 changed files with 282 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
// import {Router} from 'express'
// import { runQuery } from '../utils/sql/config/sqlConfig.js'
// import { ocmeInventory } from '../utils/sql/querys/getOCMEInventory.js'
// const router = Router()
// router.post('/getLaneData', async (req,res)=>{
// let filterdOCMELane
// // the body will need to have 1 lane in it. lane: 'B050'
// const data = req.body
// // add the lane in so we dont crash
// if(req.body.lane){
// filterdOCMELane = ocmeInventory.replaceAll('[lane]', data.lane)
// // get lanes
// const laneData = await runQuery(filterdOCMELane, 'Getting current ocme lanes linked')
// res.status(200).json({success: true,message: `All current lanes from the ocme system.`, totalpallets: laneData.length,data: laneData})
// return
// }
// // if the plant sends the id over lets change the entire where statement.
// if(req.body.laneID){
// console.log(`Getting the lane data by id`)
// filterdOCMELane = ocmeInventory.replaceAll(`alpla_laneDescription = '[lane]'`, `alpla_laneID = ${data.laneID}`)
// // get lanes
// const laneData = await runQuery(filterdOCMELane, 'Getting current ocme lanes linked')
// res.status(200).json({success: true,message: `All current lanes from the ocme system.`, totalpallets: laneData.length,data: laneData})
// return
// }
// // if everything is missing we send false
// res.status(200).json({success: false,message: `Missing either lane name or lane id.`})
// })
// export default router

View File

@@ -0,0 +1,15 @@
// import {Router} from 'express'
// import { runQuery } from '../utils/sql/config/sqlConfig.js'
// import { getLanes } from '../utils/sql/querys/getLanes.js'
// const router = Router()
// router.get('/getLanes', async (req,res)=>{
// // get lanes
// const lanes = await runQuery(getLanes, 'Getting current ocme lanes linked')
// const laneDescriptions = lanes.map(item => item.alpla_laneDescription);
// res.status(200).json({success: true,message: `All current lanes from the ocme system.`, totalLanes: lanes.length,data: laneDescriptions})
// })
// export default router