明树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
4ef055d1
Commit
4ef055d1
authored
Oct 22, 2024
by
zengfanpei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8d69e517
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
collectSMCController.js
controller/collectSMCController.js
+2
-1
collectSMC.js
db/models/collectSMC.js
+1
-1
collectSMCModule.js
module/collectSMCModule.js
+1
-1
No files found.
controller/collectSMCController.js
View file @
4ef055d1
...
@@ -54,7 +54,8 @@ async function list(req, res, next) {
...
@@ -54,7 +54,8 @@ async function list(req, res, next) {
data
=
_
.
reverse
(
data
);
data
=
_
.
reverse
(
data
);
phData
=
_
.
reverse
(
phData
);
phData
=
_
.
reverse
(
phData
);
for
(
let
index
=
0
;
index
<
data
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
data
.
length
;
index
++
)
{
const
element
=
data
[
index
];
let
element
=
data
[
index
];
element
=
element
.
toJSON
();
let
o
=
_
.
pick
(
phData
[
index
]
||
{},
[
'soilConductivity'
,
'soilConductivityUnit'
,
'soilPH'
,
'soilPHUnit'
])
let
o
=
_
.
pick
(
phData
[
index
]
||
{},
[
'soilConductivity'
,
'soilConductivityUnit'
,
'soilPH'
,
'soilPHUnit'
])
dataArr
.
push
({
dataArr
.
push
({
...
o
,
...
o
,
...
...
db/models/collectSMC.js
View file @
4ef055d1
...
@@ -151,7 +151,7 @@ const soilMoistureContentSchema = new Schema({
...
@@ -151,7 +151,7 @@ const soilMoistureContentSchema = new Schema({
toJSON
:
{
toJSON
:
{
getters
:
true
,
getters
:
true
,
}
}
,
});
});
...
...
module/collectSMCModule.js
View file @
4ef055d1
...
@@ -18,7 +18,7 @@ async function findList(search, options) {
...
@@ -18,7 +18,7 @@ async function findList(search, options) {
if
(
!
(
_
.
isNumber
(
options
.
skip
)
&&
_
.
isNumber
(
options
.
limit
)))
{
if
(
!
(
_
.
isNumber
(
options
.
skip
)
&&
_
.
isNumber
(
options
.
limit
)))
{
return
[];
return
[];
}
}
return
DB
.
CollectSMC
.
find
(
search
).
skip
(
options
.
skip
).
limit
(
options
.
limit
).
sort
({
time
:
-
1
})
.
lean
().
exec
()
;
return
DB
.
CollectSMC
.
find
(
search
).
skip
(
options
.
skip
).
limit
(
options
.
limit
).
sort
({
time
:
-
1
});
}
}
// 总量
// 总量
...
...
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