明树Git Lab

Commit d752f549 authored by zfp1's avatar zfp1

update

parent b58d5257
...@@ -193,11 +193,11 @@ async function getsuyuanBase(req, res, next) { ...@@ -193,11 +193,11 @@ async function getsuyuanBase(req, res, next) {
console.log(sourceId, "===") console.log(sourceId, "===")
let source = null; let source = null;
if (traccode.type && traccode.type == 1) { if (traccode.type && traccode.type == 1) {
source = await DB.ProductPlant.findOne({ _id: sourceId }, { productName: 1, productSpec: 1, manufactureDate: 1, batchNumber: 1, qualityInspector: 1, productUnit: 1, sellByDate: 1, sellByDateUnit: 1, productPhotos2: 1 }).populate({ path: "productPhotos2" }).populate({ path: "homepageCarouselImgs" }).lean(); source = await DB.ProductPlant.findOne({ _id: sourceId }).populate({ path: "productPhotos2" }).populate({ path: "homepageCarouselImgs" }).lean();
} else if (traccode.type && traccode.type == 2) { } else if (traccode.type && traccode.type == 2) {
source = await DB.ProductPre.findOne({ _id: sourceId }, { preProductName: 1, productSpec: 1, manufactureDate: 1, batchNumber: 1, qualityInspector: 1, productUnit: 1, sellByDate: 1, sellByDateUnit: 1, productPhotos2: 1 }).populate({ path: "productPhotos2" }).populate({ path: "homepageCarouselImgs" }).lean(); source = await DB.ProductPre.findOne({ _id: sourceId }).populate({ path: "productPhotos2" }).populate({ path: "homepageCarouselImgs" }).lean();
} else if (traccode.type && traccode.type == 3) { } else if (traccode.type && traccode.type == 3) {
source = await DB.ProductDeep.findOne({ _id: sourceId }, { preProductName: 1, productSpec: 1, manufactureDate: 1, batchNumber: 1, qualityInspector: 1, productUnit: 1, sellByDate: 1, sellByDateUnit: 1, productPhotos2: 1 }).populate({ path: "productPhotos2" }).populate({ path: "homepageCarouselImgs" }).lean(); source = await DB.ProductDeep.findOne({ _id: sourceId }).populate({ path: "productPhotos2" }).populate({ path: "homepageCarouselImgs" }).lean();
} else if (traccode.type && traccode.type == 4) { } else if (traccode.type && traccode.type == 4) {
source = await DB.ProductLt.findOne({ _id: sourceId }).populate({ path: "productPhotos2" }).populate({ path: "homepageCarouselImgs" }).lean(); source = await DB.ProductLt.findOne({ _id: sourceId }).populate({ path: "productPhotos2" }).populate({ path: "homepageCarouselImgs" }).lean();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment