明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_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
jt_backend
Commits
7c11039d
Commit
7c11039d
authored
May 28, 2026
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
6b0c978e
Pipeline
#112129
passed with stage
in 3 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
projectController.js
controller/projectController.js
+20
-8
No files found.
controller/projectController.js
View file @
7c11039d
...
@@ -636,7 +636,7 @@ async function xiangmujuecegengxin(body, projectLzType) {
...
@@ -636,7 +636,7 @@ async function xiangmujuecegengxin(body, projectLzType) {
await
DB
.
ProjectBjtj
.
destroy
({
where
:
{
projectId
:
projectInfo
.
id
,
id
:
{
[
Op
.
notIn
]:
pnids4
}
}
});
await
DB
.
ProjectBjtj
.
destroy
({
where
:
{
projectId
:
projectInfo
.
id
,
id
:
{
[
Op
.
notIn
]:
pnids4
}
}
});
await
DB
.
ProjectBjtj
.
bulkCreate
(
newprojectBjtjs
);
await
DB
.
ProjectBjtj
.
bulkCreate
(
newprojectBjtjs
);
console
.
log
(
newprojectBjtjs
,
pnids4
,
pns4
);
console
.
log
(
newprojectBjtjs
,
pnids4
,
pns4
);
await
Promise
.
all
(
pns4
.
map
(
item
=>
{
return
DB
.
ProjectBjtj
.
update
(
item
,
{
where
:
{
id
:
item
.
id
}
})
})).
catch
(
err
=>
{
console
.
log
(
err
)
});
await
Promise
.
all
(
pns4
.
map
(
item
=>
{
return
DB
.
ProjectBjtj
.
update
(
item
,
{
where
:
{
id
:
item
.
id
}
})
})).
catch
(
err
=>
{
console
.
log
(
err
)
});
// 处理 projectFxgl
// 处理 projectFxgl
let
projectFxgls
=
body
.
projectFxgls
||
[];
let
projectFxgls
=
body
.
projectFxgls
||
[];
let
pnids5
=
[],
pns5
=
[],
newprojectFxgls
=
[];
let
pnids5
=
[],
pns5
=
[],
newprojectFxgls
=
[];
...
@@ -1303,6 +1303,18 @@ async function listProject(req, res, next) {
...
@@ -1303,6 +1303,18 @@ async function listProject(req, res, next) {
}
}
async
function
getXmCompanyUser
(
req
,
res
,
next
)
{
async
function
getXmCompanyUser
(
req
,
res
,
next
)
{
let
mak
=
null
;
if
(
req
.
user
.
roles
&&
req
.
user
.
roles
.
length
)
{
for
(
let
i
=
0
;
i
<
req
.
user
.
roles
.
length
;
i
++
)
{
const
element
=
req
.
user
.
roles
[
i
];
if
((
element
.
key
||
element
)
==
"admin"
)
{
mak
=
true
;
}
}
}
if
(
mak
)
{
return
{
type
:
1
}
//集团用户
}
let
userDepart
=
await
DB
.
UserDepart
.
findOne
({
where
:
{
userId
:
req
.
user
.
id
},
raw
:
true
});
let
userDepart
=
await
DB
.
UserDepart
.
findOne
({
where
:
{
userId
:
req
.
user
.
id
},
raw
:
true
});
if
(
!
(
userDepart
&&
userDepart
.
departId
))
{
if
(
!
(
userDepart
&&
userDepart
.
departId
))
{
return
{
type
:
0
}
return
{
type
:
0
}
...
@@ -1620,15 +1632,15 @@ async function getCompanyProjectApprover(req, res, next) {
...
@@ -1620,15 +1632,15 @@ async function getCompanyProjectApprover(req, res, next) {
async
function
updateSnap
(
req
,
res
,
next
)
{
async
function
updateSnap
(
req
,
res
,
next
)
{
try
{
try
{
let
{
lixiang
,
juece
,
zaijuece
}
=
req
.
body
;
let
{
lixiang
,
juece
,
zaijuece
}
=
req
.
body
;
if
(
lixiang
&&
lixiang
.
id
)
{
if
(
lixiang
&&
lixiang
.
id
)
{
await
DB
.
ProjectLixiang
.
update
({
lixiang
},
{
where
:
{
projectId
:
lixiang
.
id
}
});
await
DB
.
ProjectLixiang
.
update
({
lixiang
},
{
where
:
{
projectId
:
lixiang
.
id
}
});
}
}
if
(
juece
&&
juece
.
id
)
{
if
(
juece
&&
juece
.
id
)
{
await
DB
.
ProjectLixiang
.
update
({
juece
},
{
where
:
{
projectId
:
juece
.
id
}
});
await
DB
.
ProjectLixiang
.
update
({
juece
},
{
where
:
{
projectId
:
juece
.
id
}
});
}
}
if
(
zaijuece
&&
zaijuece
.
id
)
{
if
(
zaijuece
&&
zaijuece
.
id
)
{
await
DB
.
ProjectLixiang
.
update
({
zaijuece
},
{
where
:
{
projectId
:
zaijuece
.
id
}
});
await
DB
.
ProjectLixiang
.
update
({
zaijuece
},
{
where
:
{
projectId
:
zaijuece
.
id
}
});
}
}
return
res
.
sendData
({})
return
res
.
sendData
({})
}
catch
(
error
)
{
}
catch
(
error
)
{
...
...
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