明树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
7b662bc7
Commit
7b662bc7
authored
Nov 19, 2024
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
481eb622
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
187 additions
and
413 deletions
+187
-413
README.md
README.md
+2
-1
dev.json
config/dev.json
+4
-2
plantContoller.js
controller/plantContoller.js
+140
-0
index.js
db/index.js
+4
-7
letianAgrDecision.js
db/models/letianAgrDecision.js
+0
-45
letianAgrTask.js
db/models/letianAgrTask.js
+0
-72
letianAgrTaskAudit.js
db/models/letianAgrTaskAudit.js
+0
-53
letianAgrTaskRecord.js
db/models/letianAgrTaskRecord.js
+0
-58
letianPlantCycle.js
db/models/letianPlantCycle.js
+1
-1
letianPlantPlan.js
db/models/letianPlantPlan.js
+14
-7
systemFlow.js
db/models/systemFlow.js
+0
-0
systemFlowDef.js
db/models/systemFlowDef.js
+0
-62
systemFlowDefNode.js
db/models/systemFlowDefNode.js
+0
-51
systemFlowDefRelation.js
db/models/systemFlowDefRelation.js
+0
-54
index.js
router/index.js
+2
-0
plantRouter.js
router/plantRouter.js
+20
-0
No files found.
README.md
View file @
7b662bc7
...
@@ -38,7 +38,8 @@
...
@@ -38,7 +38,8 @@
2. 从入库逻辑开始 入库单增删改查、入库单开启流程......
2. 从入库逻辑开始 入库单增删改查、入库单开启流程......
1. 收获周期管理,按名称与导入对应
2. 农事预警,脚本每日扫描一次,到对应周期则提示周期信息
```
```
...
...
config/dev.json
View file @
7b662bc7
{
{
"tokenEx"
:
86400000000
,
"tokenEx"
:
86400000000
,
"dbURI"
:
"mongodb://
bridata:Mingshu20170706@47.94.146.184
:27017/letian?authSource=admin"
,
"dbURI"
:
"mongodb://
127.0.0.1
:27017/letian?authSource=admin"
,
"file"
:
{
"file"
:
{
"storagePath"
:
"/uploadfiles"
"storagePath"
:
"/uploadfiles"
},
},
...
@@ -36,6 +36,8 @@
...
@@ -36,6 +36,8 @@
"cron"
:
{
"cron"
:
{
"getDeviceList"
:
false
,
"getDeviceList"
:
false
,
"getAllDevice"
:
false
,
"getAllDevice"
:
false
,
"collectDeviceInfo"
:
false
"collectDeviceInfo"
:
false
,
"collectDeviceInfo4"
:
false
,
"excel"
:
false
}
}
}
}
\ No newline at end of file
controller/plantContoller.js
0 → 100644
View file @
7b662bc7
const
errorMessage
=
require
(
"../utils/errorMessage"
);
async
function
listPlantCycle
(
req
,
res
,
next
)
{
try
{
// let userId = req.user._id;
let
search
=
{
del
:
0
};
let
page
=
req
.
body
.
page
||
1
;
let
pageSize
=
req
.
body
.
pageSize
||
10
;
let
skip
=
(
page
-
1
)
*
pageSize
;
const
count
=
await
DB
.
PlantCycle
.
countDocuments
(
search
);
let
list
=
await
DB
.
PlantCycle
.
find
(
search
).
sort
({
_id
:
-
1
}).
skip
(
skip
).
limit
(
pageSize
);
res
.
sendData
({
count
,
list
});
}
catch
(
error
)
{
next
(
error
)
}
}
async
function
createPlantCycle
(
req
,
res
,
next
)
{
try
{
const
body
=
req
.
body
;
let
ret
=
await
DB
.
PlantCycle
.
create
(
body
);
res
.
sendData
(
ret
);
}
catch
(
error
)
{
next
(
error
)
}
}
async
function
deletePlantCycle
(
req
,
res
,
next
)
{
try
{
if
(
!
req
.
body
.
_id
)
{
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
}
let
ret
=
await
DB
.
PlantCycle
.
findOneAndUpdate
({
_id
:
req
.
body
.
_id
},
{
del
:
1
});
res
.
sendData
(
ret
);
}
catch
(
error
)
{
next
(
error
)
}
}
async
function
updatePlantCycle
(
req
,
res
,
next
)
{
try
{
if
(
!
req
.
body
.
_id
)
{
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
}
let
upInfo
=
{
...
req
.
body
,
_id
:
undefined
,
}
let
ret
=
await
DB
.
PlantCycle
.
findOneAndUpdate
({
_id
:
req
.
body
.
_id
},
upInfo
);
res
.
sendData
(
ret
);
}
catch
(
error
)
{
next
(
error
)
}
}
/**-----------------------种植规划 暂时字段类型不确定---------------------------- */
async
function
createPlan
(
req
,
res
,
next
)
{
try
{
//
const
body
=
req
.
body
;
let
ret
=
await
DB
.
PlantPlan
.
create
(
body
);
res
.
sendData
(
ret
);
}
catch
(
error
)
{
next
(
error
);
}
}
async
function
listPlan
(
req
,
res
,
next
)
{
try
{
let
search
=
{
del
:
0
};
let
page
=
req
.
body
.
page
||
1
;
let
pageSize
=
req
.
body
.
pageSize
||
10
;
let
skip
=
(
page
-
1
)
*
pageSize
;
const
count
=
await
DB
.
PlantPlan
.
countDocuments
(
search
);
let
list
=
await
DB
.
PlantPlan
.
find
(
search
).
sort
({
_id
:
-
1
}).
skip
(
skip
).
limit
(
pageSize
);
res
.
sendData
({
count
,
list
});
}
catch
(
error
)
{
next
(
error
);
}
}
async
function
deletePlan
(
req
,
res
,
next
)
{
try
{
if
(
!
req
.
body
.
_id
)
{
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
}
let
ret
=
await
DB
.
PlantPlan
.
findOneAndUpdate
({
_id
:
req
.
body
.
_id
},
{
del
:
1
});
res
.
sendData
(
ret
);
}
catch
(
error
)
{
next
(
error
);
}
}
async
function
updatePlan
(
req
,
res
,
next
)
{
try
{
if
(
!
req
.
body
.
_id
)
{
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
}
let
upInfo
=
{
...
req
.
body
,
_id
:
undefined
,
}
let
ret
=
await
DB
.
PlantPlan
.
findOneAndUpdate
({
_id
:
req
.
body
.
_id
},
upInfo
);
res
.
sendData
(
ret
);
}
catch
(
error
)
{
next
(
error
);
}
}
module
.
exports
=
{
createPlantCycle
,
listPlantCycle
,
deletePlantCycle
,
updatePlantCycle
,
createPlan
,
listPlan
,
deletePlan
,
updatePlan
,
}
\ No newline at end of file
db/index.js
View file @
7b662bc7
...
@@ -34,9 +34,6 @@ const Menu = require('./models/systemMenu');
...
@@ -34,9 +34,6 @@ const Menu = require('./models/systemMenu');
const
Depart
=
require
(
'./models/systemDepart'
);
const
Depart
=
require
(
'./models/systemDepart'
);
const
File
=
require
(
'./models/systemFile'
);
const
File
=
require
(
'./models/systemFile'
);
const
Notice
=
require
(
'./models/systemNotice'
);
const
Notice
=
require
(
'./models/systemNotice'
);
const
FlowDef
=
require
(
'./models/systemFlowDef'
);
const
FlowDefNode
=
require
(
'./models/systemFlowDefNode'
);
const
FlowDefRelation
=
require
(
'./models/systemFlowDefRelation'
);
const
Land
=
require
(
'./models/letianLand'
);
const
Land
=
require
(
'./models/letianLand'
);
const
Zone
=
require
(
'./models/letianZone'
);
const
Zone
=
require
(
'./models/letianZone'
);
...
@@ -51,7 +48,8 @@ const FileTemplate = require('./models/letianFileTemplate');
...
@@ -51,7 +48,8 @@ const FileTemplate = require('./models/letianFileTemplate');
const
AreaRecord
=
require
(
'./models/letianAreaRecord'
);
const
AreaRecord
=
require
(
'./models/letianAreaRecord'
);
const
ExcelRecord
=
require
(
'./models/letianExcelRecord'
);
const
ExcelRecord
=
require
(
'./models/letianExcelRecord'
);
const
PlantCycle
=
require
(
'./models/letianPlantCycle'
);
const
PlantPlan
=
require
(
'./models/letianPlantPlan'
);
const
Device
=
require
(
'./models/collectDevice'
);
const
Device
=
require
(
'./models/collectDevice'
);
const
CollectSMC
=
require
(
'./models/collectSMC'
);
const
CollectSMC
=
require
(
'./models/collectSMC'
);
...
@@ -73,9 +71,6 @@ global.DB = {
...
@@ -73,9 +71,6 @@ global.DB = {
Depart
,
Depart
,
Notice
,
Notice
,
FlowDef
,
FlowDefNode
,
FlowDefRelation
,
Land
,
Land
,
Zone
,
Zone
,
...
@@ -89,6 +84,8 @@ global.DB = {
...
@@ -89,6 +84,8 @@ global.DB = {
FileTemplate
,
FileTemplate
,
AreaRecord
,
AreaRecord
,
ExcelRecord
,
ExcelRecord
,
PlantCycle
,
PlantPlan
,
Device
,
Device
,
CollectThreshold
,
CollectThreshold
,
...
...
db/models/letianAgrDecision.js
deleted
100644 → 0
View file @
481eb622
const
mongoose
=
require
(
'mongoose'
);
const
Schema
=
mongoose
.
Schema
;
const
moment
=
require
(
'moment'
);
/**
* 农事决策--由专家录入
*/
const
AgrTaskSchema
=
new
Schema
({
content
:
{
},
creator
:
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'User'
,
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
AgrTask
=
mongoose
.
model
(
'AgrTask'
,
AgrTaskSchema
,
'letianAgrTask'
);
module
.
exports
=
AgrTask
;
\ No newline at end of file
db/models/letianAgrTask.js
deleted
100644 → 0
View file @
481eb622
const
mongoose
=
require
(
'mongoose'
);
const
Schema
=
mongoose
.
Schema
;
const
moment
=
require
(
'moment'
);
/**
* 农事任务
*/
const
AgrTaskSchema
=
new
Schema
({
name
:
{
type
:
"任务名称"
,
},
agrType
:
{
type
:
Number
,
comment
:
"农事类型"
,
},
startTime
:
{
type
:
Date
,
omment
:
"任务开始日期"
,
},
endTime
:
{
type
:
Date
,
omment
:
"任务结束日期"
,
},
leader
:
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'User'
,
comment
:
"负责人--从分配负责人开始, 任务就开启"
},
status
:
{
type
:
Number
,
comment
:
"1. 待分配(没有leader), 3. 进行中, 5 已完成"
},
auditStatus
:
{
type
:
Number
,
comment
:
"1. 待审核, 2, 审核通过, 3.审核不通过, 记录最新的审核记录"
},
creator
:
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'User'
,
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
AgrTask
=
mongoose
.
model
(
'AgrTask'
,
AgrTaskSchema
,
'letianAgrTask'
);
module
.
exports
=
AgrTask
;
\ No newline at end of file
db/models/letianAgrTaskAudit.js
deleted
100644 → 0
View file @
481eb622
const
mongoose
=
require
(
'mongoose'
);
const
Schema
=
mongoose
.
Schema
;
const
moment
=
require
(
'moment'
);
/**
* 农事任务审核记录
*/
const
AgrTaskAuditSchema
=
new
Schema
({
creator
:
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'User'
,
comment
:
"创建人"
},
audit
:
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'User'
,
comment
:
"审核人"
},
auditStatus
:
{
type
:
Number
,
comment
:
"1. 待审核, 2, 审核通过, 3.审核不通过, 记录任务上"
},
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
AgrTaskAudit
=
mongoose
.
model
(
'AgrTaskAudit'
,
AgrTaskAuditSchema
,
'letianAgrTaskAudit'
);
module
.
exports
=
AgrTaskAudit
;
\ No newline at end of file
db/models/letianAgrTaskRecord.js
deleted
100644 → 0
View file @
481eb622
const
mongoose
=
require
(
'mongoose'
);
const
Schema
=
mongoose
.
Schema
;
const
moment
=
require
(
'moment'
);
/**
* 农事记录,一个农事任务 对应多条农事记录
*/
const
AgrTaskSchema
=
new
Schema
({
content
:
{
type
:
String
,
comment
:
"内容"
},
task
:
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
"AgrTask"
,
},
imgs
:
{
type
:
[
mongoose
.
Types
.
ObjectId
],
},
creator
:
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'User'
,
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
AgrTask
=
mongoose
.
model
(
'AgrTask'
,
AgrTaskSchema
,
'letianAgrTask'
);
module
.
exports
=
AgrTask
;
\ No newline at end of file
db/models/letianPlantCycle.js
View file @
7b662bc7
...
@@ -47,5 +47,5 @@ const PlantCycleSchema = new Schema({
...
@@ -47,5 +47,5 @@ const PlantCycleSchema = new Schema({
});
});
const
PlantCycle
=
mongoose
.
model
(
'PlantCycle'
,
PlantCycleSchema
,
'letianPlantCycle'
);
const
PlantCycle
=
mongoose
.
model
(
'
letian
PlantCycle'
,
PlantCycleSchema
,
'letianPlantCycle'
);
module
.
exports
=
PlantCycle
;
module
.
exports
=
PlantCycle
;
\ No newline at end of file
db/models/letianPlantPlan.js
View file @
7b662bc7
...
@@ -7,15 +7,26 @@ const moment = require('moment');
...
@@ -7,15 +7,26 @@ const moment = require('moment');
*/
*/
const
PlantPlanSchema
=
new
Schema
({
const
PlantPlanSchema
=
new
Schema
({
plantType
:
{
type
:
String
,
comment
:
"作物类型"
,
},
plantVariety
:
{
plantVariety
:
{
type
:
mongoose
.
Types
.
ObjectId
,
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'PlantVariety'
,
ref
:
'PlantVariety'
,
comment
:
"作物种类"
comment
:
"作物种类"
},
},
planNum
:
{
// land: {
// type: String,
// comment: "种植位置",
// },
plantArea
:
{
type
:
String
,
type
:
String
,
unique
:
true
,
comment
:
"种植面积"
,
comment
:
"种植计划编号"
},
estimatedYield
:
{
type
:
String
,
comment
:
"预计产量"
,
},
},
// zone: {
// zone: {
// type: mongoose.Types.ObjectId,
// type: mongoose.Types.ObjectId,
...
@@ -27,10 +38,6 @@ const PlantPlanSchema = new Schema({
...
@@ -27,10 +38,6 @@ const PlantPlanSchema = new Schema({
ref
:
'Land'
,
ref
:
'Land'
,
comment
:
"地块"
comment
:
"地块"
},
},
plantArea
:
{
type
:
Number
,
comment
:
"种植面积"
},
plantStatus
:
{
plantStatus
:
{
type
:
String
,
type
:
String
,
comment
:
"种植状态 采收、结束种植"
,
comment
:
"种植状态 采收、结束种植"
,
...
...
db/models/systemFlow.js
deleted
100644 → 0
View file @
481eb622
db/models/systemFlowDef.js
deleted
100644 → 0
View file @
481eb622
const
mongoose
=
require
(
'mongoose'
);
const
Schema
=
mongoose
.
Schema
;
const
moment
=
require
(
'moment'
);
const
flowDefRelationSchema
=
require
(
'./systemFlowDefRelation'
)
const
flowDefNodeSchema
=
require
(
'./systemFlowDefNode'
)
/**
* 用户
*/
const
flowDefSchema
=
new
Schema
({
name
:
{
type
:
String
,
comment
:
"流程名称"
},
key
:
{
type
:
String
,
unique
:
true
,
comment
:
"流程唯一标识"
},
// relations: {
// type: [mongoose.Types.ObjectId],
// comment: "关系 线条",
// ref: 'FlowDefRelation'
// },
// nodes: {
// type: [mongoose.Types.ObjectId],
// comment: "节点",
// ref: 'FlowDefNode'
// },
relations
:
[
flowDefRelationSchema
],
nodes
:
[
flowDefNodeSchema
],
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:表示删除,若有其他隐藏业务 不要混用此字段。'
}
},
{
id
:
false
,
toJSON
:
{
getters
:
true
,
}
});
const
FlowDef
=
mongoose
.
model
(
'FlowDef'
,
flowDefSchema
,
'systemFlowDef'
);
module
.
exports
=
FlowDef
;
\ No newline at end of file
db/models/systemFlowDefNode.js
deleted
100644 → 0
View file @
481eb622
const
mongoose
=
require
(
'mongoose'
);
const
Schema
=
mongoose
.
Schema
;
const
moment
=
require
(
'moment'
);
/**
* 流程节点: relation node
*/
const
flowDefNodeSchema
=
new
Schema
({
name
:
{
type
:
String
,
comment
:
"节点名称"
},
key
:
{
type
:
String
,
comment
:
"节点唯一标识"
},
handlerRole
:
{
type
:
mongoose
.
Types
.
ObjectId
,
comment
:
"处理角色"
},
// conditions actions 有待扩展
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:表示删除,若有其他隐藏业务 不要混用此字段。'
}
},
{
id
:
false
,
toJSON
:
{
getters
:
true
,
}
});
// flowDefNodeSchema.index({ _id: 1, key: 1 }, { unique: true })
// const FlowDefNode = mongoose.model('FlowDefNode', flowDefNodeSchema, 'systemFlowDefNode');
// module.exports = FlowDefNode;
module
.
exports
=
flowDefNodeSchema
;
\ No newline at end of file
db/models/systemFlowDefRelation.js
deleted
100644 → 0
View file @
481eb622
const
mongoose
=
require
(
'mongoose'
);
const
Schema
=
mongoose
.
Schema
;
const
moment
=
require
(
'moment'
);
/**
* 流程节点: relation node
*/
const
flowDefRelationSchema
=
new
Schema
({
name
:
{
type
:
String
,
comment
:
"连线名称"
},
preNode
:
{
type
:
mongoose
.
Types
.
ObjectId
,
comment
:
"前置节点"
,
required
:
true
,
},
postNode
:
{
type
:
mongoose
.
Types
.
ObjectId
,
comment
:
"后置节点"
,
required
:
true
,
},
// conditions actions 有待扩展
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:表示删除,若有其他隐藏业务 不要混用此字段。'
}
},
{
id
:
false
,
toJSON
:
{
getters
:
true
,
}
});
// const FlowDefRelation = mongoose.model('FlowDefRelation', flowDefRelationSchema, 'systemFlowDefRelation');
// module.exports = FlowDefRelation;
module
.
exports
=
flowDefRelationSchema
;
\ No newline at end of file
router/index.js
View file @
7b662bc7
...
@@ -15,6 +15,7 @@ const landRouter = require('./landRouter');
...
@@ -15,6 +15,7 @@ const landRouter = require('./landRouter');
const
zoneRouter
=
require
(
'./zoneRouter'
);
const
zoneRouter
=
require
(
'./zoneRouter'
);
const
agrInputRouter
=
require
(
'./agrRouter'
);
const
agrInputRouter
=
require
(
'./agrRouter'
);
const
plantRouter
=
require
(
'./plantRouter'
);
const
statisticsRouter
=
require
(
'./statisticsRouter'
);
const
statisticsRouter
=
require
(
'./statisticsRouter'
);
const
flowRouter
=
require
(
'./flowRouter'
);
const
flowRouter
=
require
(
'./flowRouter'
);
...
@@ -37,6 +38,7 @@ router.use('/land', landRouter); //地块
...
@@ -37,6 +38,7 @@ router.use('/land', landRouter); //地块
router
.
use
(
'/zone'
,
zoneRouter
);
//区域--可扩展为行政区划
router
.
use
(
'/zone'
,
zoneRouter
);
//区域--可扩展为行政区划
router
.
use
(
'/agr'
,
agrInputRouter
);
// 农业投入品相关
router
.
use
(
'/agr'
,
agrInputRouter
);
// 农业投入品相关
router
.
use
(
'/plant'
,
plantRouter
);
// 种植相关
router
.
use
(
'/statistics'
,
statisticsRouter
);
// 统计 大屏
router
.
use
(
'/statistics'
,
statisticsRouter
);
// 统计 大屏
...
...
router/plantRouter.js
0 → 100644
View file @
7b662bc7
const
express
=
require
(
'express'
);
const
router
=
express
.
Router
();
const
plantContoller
=
require
(
'../controller/plantContoller.js'
);
// 生长周期
router
.
post
(
'/cycle/create'
,
plantContoller
.
createPlantCycle
);
router
.
post
(
'/cycle/list'
,
plantContoller
.
listPlantCycle
);
router
.
post
(
'/cycle/delete'
,
plantContoller
.
deletePlantCycle
);
router
.
post
(
'/cycle/update'
,
plantContoller
.
updatePlantCycle
);
// 种植规划
router
.
post
(
'/plan/create'
,
plantContoller
.
createPlan
);
router
.
post
(
'/plan/list'
,
plantContoller
.
listPlan
);
router
.
post
(
'/plan/delete'
,
plantContoller
.
deletePlan
);
router
.
post
(
'/plan/update'
,
plantContoller
.
updatePlan
);
module
.
exports
=
router
;
\ No newline at end of file
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