明树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
ea2181a5
Commit
ea2181a5
authored
Sep 14, 2024
by
zengfanpei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
1f2d5b07
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
53 additions
and
2 deletions
+53
-2
landController.js
controller/landController.js
+1
-1
letianAgrDecision.js
db/models/letianAgrDecision.js
+3
-1
letianAgrMat.js
db/models/letianAgrMat.js
+48
-0
letianAgrMatApply.js
db/models/letianAgrMatApply.js
+0
-0
letianAgrMatIN.js
db/models/letianAgrMatIN.js
+0
-0
letianAgrMatINExa.js
db/models/letianAgrMatINExa.js
+0
-0
letianAgrMatName.js
db/models/letianAgrMatName.js
+0
-0
letianAgrMatOUT.js
db/models/letianAgrMatOUT.js
+0
-0
letianAgrMatReturn.js
db/models/letianAgrMatReturn.js
+0
-0
letianAgrMatType.js
db/models/letianAgrMatType.js
+0
-0
letianLand.js
db/models/letianLand.js
+1
-0
No files found.
controller/landController.js
View file @
ea2181a5
...
...
@@ -42,7 +42,7 @@ async function list (req, res, next) {
search
.
name
=
{
$regex
:
req
.
body
.
name
};
}
const
count
=
await
DB
.
Land
.
countDocuments
(
search
);
const
list
=
await
DB
.
Land
.
find
(
search
).
skip
(
skip
).
limit
(
pageSize
);
const
list
=
await
DB
.
Land
.
find
(
search
).
populate
({
path
:
"zone"
}).
skip
(
skip
).
limit
(
pageSize
).
lean
().
exec
(
);
return
res
.
sendData
({
list
,
count
});
}
catch
(
error
)
{
next
(
error
);
...
...
db/models/letianAgrDecision.js
View file @
ea2181a5
...
...
@@ -7,7 +7,9 @@ const moment = require('moment');
*/
const
AgrTaskSchema
=
new
Schema
({
content
:
{
},
creator
:
{
type
:
mongoose
.
Types
.
ObjectId
,
...
...
db/models/letianAgrMat.js
0 → 100644
View file @
ea2181a5
const
mongoose
=
require
(
'mongoose'
);
const
Schema
=
mongoose
.
Schema
;
const
moment
=
require
(
'moment'
);
/**
* 农资管理-农资基础信息表
*/
const
AgrMaterialSchema
=
new
Schema
({
type
:
{
type
:
mongoose
.
Types
.
ObjectId
,
comment
:
"农资类型"
},
name
:
{
type
:
mongoose
.
Types
.
ObjectId
,
comment
:
"农资名称"
},
count
:
{
type
:
Number
,
comment
:
"农资库存数量"
},
createdAt
:
{
type
:
Date
,
default
:
Date
.
now
,
get
:
v
=>
moment
(
v
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
},
updatedAt
:
{
type
:
Date
,
default
:
Date
.
now
,
get
:
v
=>
moment
(
v
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
},
del
:
{
type
:
Number
,
default
:
0
,
comment
:
'默认0 , 1:表示删除, 若有其他隐藏业务 不要混用此字段。'
}
},
{
toJSON
:
{
getters
:
true
}
});
const
AgrMaterial
=
mongoose
.
model
(
'AgrMaterial'
,
AgrMaterialSchema
,
'letianAgrMaterial'
);
module
.
exports
=
AgrMaterial
;
\ No newline at end of file
db/models/letianAgrMatApply.js
0 → 100644
View file @
ea2181a5
db/models/letianAgrMatIN.js
0 → 100644
View file @
ea2181a5
db/models/letianAgrMatINExa.js
0 → 100644
View file @
ea2181a5
db/models/letianAgrMatName.js
0 → 100644
View file @
ea2181a5
db/models/letianAgrMatOUT.js
0 → 100644
View file @
ea2181a5
db/models/letianAgrMatReturn.js
0 → 100644
View file @
ea2181a5
db/models/letianAgrMatType.js
0 → 100644
View file @
ea2181a5
db/models/letianLand.js
View file @
ea2181a5
...
...
@@ -39,6 +39,7 @@ const landSchema = new Schema({
},
zone
:
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
"Zone"
,
comment
:
"地块隶属于哪一个园区, 理论上每一级都可以绑定地块, 建议只能选择zone的最后一级"
},
/* -----地理信息----- */
...
...
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