You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.0 KiB
JavaScript

const Stock = require('../model/stock');
exports.getStockRowColumn = async (req, res, next)=>{
const {
leftShelveId,
rightShelveId
} = req.query;
let left = await Stock.getStockRowColumn(leftShelveId);
let right;
if(leftShelveId === rightShelveId) {
right = left;
} else {
right = await Stock.getStockRowColumn(rightShelveId);
}
res.send({
code: 200,
data: {
left,
right
}
});
res.end();
}
// 如果是人工复合错误那么就需要取stock_log里的关联的最新的信息。
exports.getStockRowColumnNesInfo = async (req, res, next) => {
const { shelveId, row, column } = req.query;
const data = await Stock.getStockRowColumnNesInfo(shelveId, row, column);
if(!data) {
res.send({
code: 200,
message: '暂无数据',
data: {}
});
}else {
res.send({
code: 200,
data: data
});
}
res.end();
}