明树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
7ff0c0bc
Commit
7ff0c0bc
authored
Oct 22, 2024
by
zengfanpei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
3070be14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
collectSMCController.js
controller/collectSMCController.js
+3
-2
collectSMCModule.js
module/collectSMCModule.js
+0
-1
No files found.
controller/collectSMCController.js
View file @
7ff0c0bc
...
...
@@ -39,13 +39,14 @@ async function list(req, res, next) {
search
.
deviceNumber
=
{
$in
:
devNums
}
}
}
search
.
deviceHQType
=
req
.
body
.
deviceHQType
;
search
.
deviceHQType
=
req
.
body
.
deviceHQType
||
1
;
let
page
=
req
.
body
.
page
||
1
;
let
pageSize
=
req
.
body
.
pageSize
||
10
;
let
skip
=
(
page
-
1
)
*
pageSize
;
console
.
log
(
search
);
let
count
=
await
collectSMCModule
.
count
(
search
);
let
data
=
await
collectSMCModule
.
findList
(
search
,
{
skip
,
limit
:
pageSize
});
if
(
!
search
.
deviceHQType
)
{
// 这段是为了大屏 把 ph电导率 和 温湿度氮磷钾 合并起来
if
(
!
req
.
body
.
deviceHQType
)
{
// 这段是为了大屏 把 ph电导率 和 温湿度氮磷钾 合并起来
search
.
deviceHQType
=
2
;
delete
search
.
deviceNumber
;
let
phData
=
await
collectSMCModule
.
findList
(
search
,
{
skip
,
limit
:
pageSize
});
...
...
module/collectSMCModule.js
View file @
7ff0c0bc
...
...
@@ -23,7 +23,6 @@ async function findList(search, options) {
// 总量
async
function
count
(
search
)
{
console
.
log
(
DB
.
CollectSMC
)
return
DB
.
CollectSMC
.
countDocuments
(
search
);
}
...
...
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