明树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
3cc69fde
Commit
3cc69fde
authored
Dec 12, 2024
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
33f8984c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
agrMatController.js
controller/agrMatController.js
+3
-1
No files found.
controller/agrMatController.js
View file @
3cc69fde
...
@@ -98,6 +98,7 @@ async function queryMatApprList(req, res, next) {
...
@@ -98,6 +98,7 @@ async function queryMatApprList(req, res, next) {
async
function
queryMatApprInfo
(
req
,
res
,
next
)
{
async
function
queryMatApprInfo
(
req
,
res
,
next
)
{
try
{
try
{
let
search
=
{
del
:
0
};
let
search
=
{
del
:
0
};
console
.
log
(
req
.
body
,
"==="
)
if
(
!
req
.
body
.
_id
)
{
if
(
!
req
.
body
.
_id
)
{
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
}
}
...
@@ -105,7 +106,8 @@ async function queryMatApprInfo(req, res, next) {
...
@@ -105,7 +106,8 @@ async function queryMatApprInfo(req, res, next) {
if
(
!
(
approval
&&
approval
.
_id
))
{
if
(
!
(
approval
&&
approval
.
_id
))
{
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
}
}
let
inout
=
await
DB
.
AgrMatInOut
.
find
({
approval
:
req
.
body
.
_id
}).
populate
({
path
:
"creator"
}).
sort
({
_id
:
1
}).
lean
().
exec
();
let
inout
=
await
DB
.
AgrMatInOut
.
find
({
approval
:
req
.
body
.
_id
}).
sort
({
_id
:
1
}).
lean
().
exec
();
console
.
log
(
inout
,
"="
)
approval
.
materials
=
inout
||
[];
approval
.
materials
=
inout
||
[];
return
approval
;
return
approval
;
}
catch
(
error
)
{
}
catch
(
error
)
{
...
...
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