明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
letian_backend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zengfanpei
letian_backend
Commits
cd3d8a75
Commit
cd3d8a75
authored
May 26, 2025
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0b9cdcf3
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
146 additions
and
150 deletions
+146
-150
productDeepController.js
controller/productDeepController.js
+7
-7
productDirPlantController.js
controller/productDirPlantController.js
+7
-7
productPreController.js
controller/productPreController.js
+7
-7
productTracController.js
controller/productTracController.js
+61
-65
letianProTraceCode.js
db/models/letianProTraceCode.js
+22
-0
letianProductDeep.js
db/models/letianProductDeep.js
+0
-22
letianProductPlant.js
db/models/letianProductPlant.js
+21
-21
letianProductPre.js
db/models/letianProductPre.js
+21
-21
No files found.
controller/productDeepController.js
View file @
cd3d8a75
...
@@ -5,11 +5,11 @@ async function createDeepPlant(req, res, next) {
...
@@ -5,11 +5,11 @@ async function createDeepPlant(req, res, next) {
const
body
=
req
.
body
;
const
body
=
req
.
body
;
let
count
=
await
DB
.
ProductDeep
.
countDocuments
();
//没有真实删除 永远递增
let
count
=
await
DB
.
ProductDeep
.
countDocuments
();
//没有真实删除 永远递增
body
.
productNumber
=
count
;
body
.
productNumber
=
count
;
body
.
qualityInsReportImgs
=
(
body
.
qualityInsReportImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
//
body.qualityInsReportImgs = (body.qualityInsReportImgs || []).map(o => {return o && o._id || o});
body
.
flourMerchantImgs
=
(
body
.
flourMerchantImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
//
body.flourMerchantImgs = (body.flourMerchantImgs || []).map(o => {return o && o._id || o});
body
.
productPhotos2
=
(
body
.
productPhotos2
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
productPhotos2
=
(
body
.
productPhotos2
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
homepageCarouselImgs
=
(
body
.
homepageCarouselImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
homepageCarouselImgs
=
(
body
.
homepageCarouselImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
pesticidetImgs
=
(
body
.
pesticidetImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
//
body.pesticidetImgs = (body.pesticidetImgs || []).map(o => {return o && o._id || o});
let
ret
=
await
DB
.
ProductDeep
.
create
(
body
);
let
ret
=
await
DB
.
ProductDeep
.
create
(
body
);
res
.
sendData
(
ret
);
res
.
sendData
(
ret
);
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -26,7 +26,7 @@ async function listDeepPlant(req, res, next) {
...
@@ -26,7 +26,7 @@ async function listDeepPlant(req, res, next) {
search
.
preProductName
=
{
$regex
:
req
.
body
.
name
}
search
.
preProductName
=
{
$regex
:
req
.
body
.
name
}
}
}
const
count
=
await
DB
.
ProductDeep
.
countDocuments
(
search
);
const
count
=
await
DB
.
ProductDeep
.
countDocuments
(
search
);
let
list
=
await
DB
.
ProductDeep
.
find
(
search
).
populate
({
path
:
"productPhotos2"
}).
populate
({
path
:
"
qualityInsReportImgs"
}).
populate
({
path
:
"flourMerchantImgs"
}).
populate
({
path
:
"pesticidetImgs"
}).
populate
({
path
:
"
homepageCarouselImgs"
}).
populate
({
path
:
"monitorInfo.device"
}).
sort
({
_id
:
-
1
}).
skip
(
skip
).
limit
(
pageSize
).
lean
().
exec
();
let
list
=
await
DB
.
ProductDeep
.
find
(
search
).
populate
({
path
:
"productPhotos2"
}).
populate
({
path
:
"homepageCarouselImgs"
}).
populate
({
path
:
"monitorInfo.device"
}).
sort
({
_id
:
-
1
}).
skip
(
skip
).
limit
(
pageSize
).
lean
().
exec
();
res
.
sendData
({
count
,
list
});
res
.
sendData
({
count
,
list
});
}
catch
(
error
)
{
}
catch
(
error
)
{
next
(
error
);
next
(
error
);
...
@@ -49,11 +49,11 @@ async function updateDeepPlant(req, res, next) {
...
@@ -49,11 +49,11 @@ async function updateDeepPlant(req, res, next) {
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
}
}
let
body
=
req
.
body
;
let
body
=
req
.
body
;
body
.
qualityInsReportImgs
=
(
body
.
qualityInsReportImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
//
body.qualityInsReportImgs = (body.qualityInsReportImgs || []).map(o => {return o && o._id || o});
body
.
flourMerchantImgs
=
(
body
.
flourMerchantImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
//
body.flourMerchantImgs = (body.flourMerchantImgs || []).map(o => {return o && o._id || o});
body
.
productPhotos2
=
(
body
.
productPhotos2
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
productPhotos2
=
(
body
.
productPhotos2
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
homepageCarouselImgs
=
(
body
.
homepageCarouselImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
homepageCarouselImgs
=
(
body
.
homepageCarouselImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
pesticidetImgs
=
(
body
.
pesticidetImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
//
body.pesticidetImgs = (body.pesticidetImgs || []).map(o => {return o && o._id || o});
let
upInfo
=
{
let
upInfo
=
{
...
body
,
...
body
,
_id
:
undefined
,
_id
:
undefined
,
...
...
controller/productDirPlantController.js
View file @
cd3d8a75
...
@@ -5,11 +5,11 @@ async function createDirectPlant(req, res, next) {
...
@@ -5,11 +5,11 @@ async function createDirectPlant(req, res, next) {
const
body
=
req
.
body
;
const
body
=
req
.
body
;
let
count
=
await
DB
.
ProductPlant
.
countDocuments
();
//没有真实删除 永远递增
let
count
=
await
DB
.
ProductPlant
.
countDocuments
();
//没有真实删除 永远递增
body
.
productNumber
=
count
;
body
.
productNumber
=
count
;
body
.
qualityInsReportImgs
=
(
body
.
qualityInsReportImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
// body.qualityInsReportImgs = (body.qualityInsReportImgs || []).map(o => {return o && o._id || o});
body
.
flourMerchantImgs
=
(
body
.
flourMerchantImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
// body.flourMerchantImgs = (body.flourMerchantImgs || []).map(o => {return o && o._id || o});
// body.pesticidetImgs = (body.pesticidetImgs || []).map(o => {return o && o._id || o});
body
.
homepageCarouselImgs
=
(
body
.
homepageCarouselImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
homepageCarouselImgs
=
(
body
.
homepageCarouselImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
productPhotos2
=
(
body
.
productPhotos2
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
productPhotos2
=
(
body
.
productPhotos2
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
pesticidetImgs
=
(
body
.
pesticidetImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
let
ret
=
await
DB
.
ProductPlant
.
create
(
body
);
let
ret
=
await
DB
.
ProductPlant
.
create
(
body
);
res
.
sendData
(
ret
);
res
.
sendData
(
ret
);
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -27,7 +27,7 @@ async function listDirectPlant(req, res, next) {
...
@@ -27,7 +27,7 @@ async function listDirectPlant(req, res, next) {
}
}
const
count
=
await
DB
.
ProductPlant
.
countDocuments
(
search
);
const
count
=
await
DB
.
ProductPlant
.
countDocuments
(
search
);
let
list
=
await
DB
.
ProductPlant
.
find
(
search
).
populate
({
path
:
"plantPlan"
}).
populate
({
path
:
"
pesticidetImgs"
}).
populate
({
path
:
"homepageCarouselImgs"
}).
populate
({
path
:
"productPhotos2"
}).
populate
({
path
:
"qualityInsReportImgs"
}).
populate
({
path
:
"flourMerchantImgs
"
}).
populate
({
path
:
"monitorInfo.device"
}).
sort
({
_id
:
-
1
}).
skip
(
skip
).
limit
(
pageSize
).
lean
().
exec
();
let
list
=
await
DB
.
ProductPlant
.
find
(
search
).
populate
({
path
:
"plantPlan"
}).
populate
({
path
:
"
homepageCarouselImgs"
}).
populate
({
path
:
"productPhotos2
"
}).
populate
({
path
:
"monitorInfo.device"
}).
sort
({
_id
:
-
1
}).
skip
(
skip
).
limit
(
pageSize
).
lean
().
exec
();
res
.
sendData
({
count
,
list
});
res
.
sendData
({
count
,
list
});
}
catch
(
error
)
{
}
catch
(
error
)
{
next
(
error
);
next
(
error
);
...
@@ -50,11 +50,11 @@ async function updateDirectPlant(req, res, next) {
...
@@ -50,11 +50,11 @@ async function updateDirectPlant(req, res, next) {
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
}
}
let
body
=
req
.
body
;
let
body
=
req
.
body
;
body
.
qualityInsReportImgs
=
(
body
.
qualityInsReportImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
// body.qualityInsReportImgs = (body.qualityInsReportImgs || []).map(o => {return o && o._id || o});
body
.
flourMerchantImgs
=
(
body
.
flourMerchantImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
// body.flourMerchantImgs = (body.flourMerchantImgs || []).map(o => {return o && o._id || o});
// body.pesticidetImgs = (body.pesticidetImgs || []).map(o => {return o && o._id || o});
body
.
homepageCarouselImgs
=
(
body
.
homepageCarouselImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
homepageCarouselImgs
=
(
body
.
homepageCarouselImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
productPhotos2
=
(
body
.
productPhotos2
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
productPhotos2
=
(
body
.
productPhotos2
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
pesticidetImgs
=
(
body
.
pesticidetImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
let
upInfo
=
{
let
upInfo
=
{
...
body
,
...
body
,
_id
:
undefined
,
_id
:
undefined
,
...
...
controller/productPreController.js
View file @
cd3d8a75
...
@@ -6,9 +6,9 @@ async function createPrePlant(req, res, next) {
...
@@ -6,9 +6,9 @@ async function createPrePlant(req, res, next) {
const
body
=
req
.
body
;
const
body
=
req
.
body
;
let
count
=
await
DB
.
ProductPre
.
countDocuments
();
//没有真实删除 永远递增
let
count
=
await
DB
.
ProductPre
.
countDocuments
();
//没有真实删除 永远递增
body
.
productNumber
=
count
;
body
.
productNumber
=
count
;
body
.
qualityInsReportImgs
=
(
body
.
qualityInsReportImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
//
body.qualityInsReportImgs = (body.qualityInsReportImgs || []).map(o => {return o && o._id || o});
body
.
flourMerchantImgs
=
(
body
.
flourMerchantImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
//
body.flourMerchantImgs = (body.flourMerchantImgs || []).map(o => {return o && o._id || o});
body
.
pesticidetImgs
=
(
body
.
pesticidetImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
//
body.pesticidetImgs = (body.pesticidetImgs || []).map(o => {return o && o._id || o});
body
.
homepageCarouselImgs
=
(
body
.
homepageCarouselImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
homepageCarouselImgs
=
(
body
.
homepageCarouselImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
productPhotos2
=
(
body
.
productPhotos2
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
productPhotos2
=
(
body
.
productPhotos2
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
let
ret
=
await
DB
.
ProductPre
.
create
(
body
);
let
ret
=
await
DB
.
ProductPre
.
create
(
body
);
...
@@ -27,7 +27,7 @@ async function listPrePlant(req, res, next) {
...
@@ -27,7 +27,7 @@ async function listPrePlant(req, res, next) {
search
.
preProductName
=
{
$regex
:
req
.
body
.
name
}
search
.
preProductName
=
{
$regex
:
req
.
body
.
name
}
}
}
const
count
=
await
DB
.
ProductPre
.
countDocuments
(
search
);
const
count
=
await
DB
.
ProductPre
.
countDocuments
(
search
);
let
list
=
await
DB
.
ProductPre
.
find
(
search
).
populate
({
path
:
"productPhotos2"
}).
populate
({
path
:
"sourcePlantProduct"
}).
populate
({
path
:
"
qualityInsReportImgs"
}).
populate
({
path
:
"flourMerchantImgs"
}).
populate
({
path
:
"pesticidetImgs"
}).
populate
({
path
:
"
homepageCarouselImgs"
}).
populate
({
path
:
"monitorInfo.device"
}).
sort
({
_id
:
-
1
}).
skip
(
skip
).
limit
(
pageSize
).
lean
().
exec
();
let
list
=
await
DB
.
ProductPre
.
find
(
search
).
populate
({
path
:
"productPhotos2"
}).
populate
({
path
:
"sourcePlantProduct"
}).
populate
({
path
:
"homepageCarouselImgs"
}).
populate
({
path
:
"monitorInfo.device"
}).
sort
({
_id
:
-
1
}).
skip
(
skip
).
limit
(
pageSize
).
lean
().
exec
();
res
.
sendData
({
count
,
list
});
res
.
sendData
({
count
,
list
});
}
catch
(
error
)
{
}
catch
(
error
)
{
next
(
error
);
next
(
error
);
...
@@ -50,9 +50,9 @@ async function updatePrePlant(req, res, next) {
...
@@ -50,9 +50,9 @@ async function updatePrePlant(req, res, next) {
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
}
}
let
body
=
req
.
body
;
let
body
=
req
.
body
;
body
.
qualityInsReportImgs
=
(
body
.
qualityInsReportImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
//
body.qualityInsReportImgs = (body.qualityInsReportImgs || []).map(o => {return o && o._id || o});
body
.
flourMerchantImgs
=
(
body
.
flourMerchantImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
//
body.flourMerchantImgs = (body.flourMerchantImgs || []).map(o => {return o && o._id || o});
body
.
pesticidetImgs
=
(
body
.
pesticidetImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
//
body.pesticidetImgs = (body.pesticidetImgs || []).map(o => {return o && o._id || o});
body
.
homepageCarouselImgs
=
(
body
.
homepageCarouselImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
homepageCarouselImgs
=
(
body
.
homepageCarouselImgs
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
productPhotos2
=
(
body
.
productPhotos2
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
body
.
productPhotos2
=
(
body
.
productPhotos2
||
[]).
map
(
o
=>
{
return
o
&&
o
.
_id
||
o
});
let
upInfo
=
{
let
upInfo
=
{
...
...
controller/productTracController.js
View file @
cd3d8a75
This diff is collapsed.
Click to expand it.
db/models/letianProTraceCode.js
View file @
cd3d8a75
...
@@ -99,6 +99,28 @@ const letianProTraceCodeSchema = new Schema({
...
@@ -99,6 +99,28 @@ const letianProTraceCodeSchema = new Schema({
type
:
Boolean
,
type
:
Boolean
,
},
},
flourMerchantImgs
:
[
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'File'
,
comment
:
"面粉商原料检测报告图"
}
],
qualityInsReportImgs
:
[
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'File'
,
comment
:
"质检报告图"
}
],
pesticidetImgs
:
[
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'File'
,
comment
:
"农残质检报告"
}
],
creator
:
{
creator
:
{
type
:
mongoose
.
Types
.
ObjectId
,
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'User'
,
ref
:
'User'
,
...
...
db/models/letianProductDeep.js
View file @
cd3d8a75
...
@@ -43,13 +43,6 @@ const letianProductDeepSchema = new Schema({
...
@@ -43,13 +43,6 @@ const letianProductDeepSchema = new Schema({
comment
:
"产品详情轮播图"
comment
:
"产品详情轮播图"
}
}
],
],
pesticidetImgs
:
[
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'File'
,
comment
:
"农残质检报告"
}
],
sellByDate
:
{
sellByDate
:
{
type
:
String
,
type
:
String
,
comment
:
"保质期"
comment
:
"保质期"
...
@@ -83,13 +76,6 @@ const letianProductDeepSchema = new Schema({
...
@@ -83,13 +76,6 @@ const letianProductDeepSchema = new Schema({
type
:
String
,
type
:
String
,
comment
:
"产品编号"
comment
:
"产品编号"
},
},
qualityInsReportImgs
:
[
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'File'
,
comment
:
"质检报告图"
}
],
monitorInfo
:
{
monitorInfo
:
{
type
:
[
type
:
[
{
{
...
@@ -164,14 +150,6 @@ const letianProductDeepSchema = new Schema({
...
@@ -164,14 +150,6 @@ const letianProductDeepSchema = new Schema({
get
:
v
=>
moment
(
v
).
format
(
"YYYY-MM-DD"
),
get
:
v
=>
moment
(
v
).
format
(
"YYYY-MM-DD"
),
comment
:
"生产日期"
comment
:
"生产日期"
},
},
flourMerchantImgs
:
[
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'File'
,
comment
:
"面粉商原料检测报告图"
}
],
createdAt
:
{
createdAt
:
{
...
...
db/models/letianProductPlant.js
View file @
cd3d8a75
...
@@ -70,20 +70,20 @@ const letianProductPlantSchema = new Schema({
...
@@ -70,20 +70,20 @@ const letianProductPlantSchema = new Schema({
type
:
Number
,
type
:
Number
,
comment
:
"产品编号"
comment
:
"产品编号"
},
},
qualityInsReportImgs
:
[
//
qualityInsReportImgs: [
{
//
{
type
:
mongoose
.
Types
.
ObjectId
,
//
type: mongoose.Types.ObjectId,
ref
:
'File'
,
//
ref: 'File',
comment
:
"质检报告图"
//
comment: "质检报告图"
}
//
}
],
//
],
pesticidetImgs
:
[
//
pesticidetImgs: [
{
//
{
type
:
mongoose
.
Types
.
ObjectId
,
//
type: mongoose.Types.ObjectId,
ref
:
'File'
,
//
ref: 'File',
comment
:
"农残质检报告"
//
comment: "农残质检报告"
}
//
}
],
//
],
monitorInfo
:
{
monitorInfo
:
{
type
:
[
type
:
[
{
{
...
@@ -145,13 +145,13 @@ const letianProductPlantSchema = new Schema({
...
@@ -145,13 +145,13 @@ const letianProductPlantSchema = new Schema({
get
:
v
=>
moment
(
v
).
format
(
"YYYY-MM-DD"
),
get
:
v
=>
moment
(
v
).
format
(
"YYYY-MM-DD"
),
comment
:
"生产日期"
comment
:
"生产日期"
},
},
flourMerchantImgs
:
[
//
flourMerchantImgs: [
{
//
{
type
:
mongoose
.
Types
.
ObjectId
,
//
type: mongoose.Types.ObjectId,
ref
:
'File'
,
//
ref: 'File',
comment
:
"面粉商原料检测报告图"
//
comment: "面粉商原料检测报告图"
}
//
}
],
//
],
createdAt
:
{
createdAt
:
{
type
:
Date
,
type
:
Date
,
...
...
db/models/letianProductPre.js
View file @
cd3d8a75
...
@@ -76,20 +76,20 @@ const letianProductPreSchema = new Schema({
...
@@ -76,20 +76,20 @@ const letianProductPreSchema = new Schema({
type
:
String
,
type
:
String
,
comment
:
"产品编号"
comment
:
"产品编号"
},
},
qualityInsReportImgs
:
[
//
qualityInsReportImgs: [
{
//
{
type
:
mongoose
.
Types
.
ObjectId
,
//
type: mongoose.Types.ObjectId,
ref
:
'File'
,
//
ref: 'File',
comment
:
"质检报告图"
//
comment: "质检报告图"
}
//
}
],
//
],
pesticidetImgs
:
[
//
pesticidetImgs: [
{
//
{
type
:
mongoose
.
Types
.
ObjectId
,
//
type: mongoose.Types.ObjectId,
ref
:
'File'
,
//
ref: 'File',
comment
:
"农残质检报告"
//
comment: "农残质检报告"
}
//
}
],
//
],
monitorInfo
:
{
//农业
monitorInfo
:
{
//农业
type
:
[
type
:
[
{
{
...
@@ -152,13 +152,13 @@ const letianProductPreSchema = new Schema({
...
@@ -152,13 +152,13 @@ const letianProductPreSchema = new Schema({
get
:
v
=>
moment
(
v
).
format
(
"YYYY-MM-DD"
),
get
:
v
=>
moment
(
v
).
format
(
"YYYY-MM-DD"
),
comment
:
"生产日期"
comment
:
"生产日期"
},
},
flourMerchantImgs
:
[
//
flourMerchantImgs: [
{
//
{
type
:
mongoose
.
Types
.
ObjectId
,
//
type: mongoose.Types.ObjectId,
ref
:
'File'
,
//
ref: 'File',
comment
:
"面粉商原料检测报告图"
//
comment: "面粉商原料检测报告图"
}
//
}
],
//
],
createdAt
:
{
createdAt
:
{
type
:
Date
,
type
:
Date
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment