明树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
43dcb978
Commit
43dcb978
authored
Sep 13, 2024
by
zengfanpei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
83a1ca9d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
32 deletions
+6
-32
departController.js
controller/departController.js
+2
-1
letianAgrDecision.js
db/models/letianAgrDecision.js
+1
-30
systemUser.js
db/models/systemUser.js
+3
-1
No files found.
controller/departController.js
View file @
43dcb978
...
...
@@ -76,7 +76,8 @@ async function updateDepart(req, res, next) {
}
//如果用此接口删除
if
(
req
.
body
.
del
==
1
)
{
await
DB
.
User
.
updateMany
({
depart
:
req
.
body
.
_id
},
{
depart
:
null
})
let
a
=
await
DB
.
User
.
updateMany
({
depart
:
req
.
body
.
_id
},
{
depart
:
null
});
console
.
log
(
a
);
}
let
ret
=
await
departModule
.
findOneAndUpdate
({
_id
:
req
.
body
.
_id
},
updateObj
);
res
.
sendData
(
ret
);
...
...
db/models/letianAgrDecision.js
View file @
43dcb978
...
...
@@ -7,36 +7,7 @@ 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
,
...
...
db/models/systemUser.js
View file @
43dcb978
...
...
@@ -35,12 +35,14 @@ const userSchema = new Schema({
roles
:
{
type
:
[
mongoose
.
Types
.
ObjectId
],
ref
:
"Role"
,
default
:
[],
},
/**------------- */
depart
:
{
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
"Depart"
,
comment
:
"一个人只有一个部门 ,若存在一个人多个部门的情况,需要重新设计"
comment
:
"一个人只有一个部门 ,若存在一个人多个部门的情况,需要重新设计"
,
default
:
null
,
},
enable
:
{
...
...
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