明树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
e4ad769d
Commit
e4ad769d
authored
Jan 21, 2026
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
edc23b60
Pipeline
#106418
passed with stage
in 3 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
projectTzController.js
controller/projectTzController.js
+15
-2
No files found.
controller/projectTzController.js
View file @
e4ad769d
...
@@ -792,7 +792,7 @@ async function updateJsqtzjc(req, res, next) {
...
@@ -792,7 +792,7 @@ async function updateJsqtzjc(req, res, next) {
if
(
!
req
.
body
.
projectId
)
{
if
(
!
req
.
body
.
projectId
)
{
return
res
.
sendError
(
errorMessage
.
paramsError
);
return
res
.
sendError
(
errorMessage
.
paramsError
);
}
}
let
jsqtzjc
=
await
DB
.
TzJsqtzjc
.
findOne
({
where
:
{
id
:
req
.
body
.
id
},
raw
:
true
});
let
jsqtzjc
=
await
DB
.
TzJsqtzjc
.
findOne
({
where
:
{
id
:
req
.
body
.
id
},
raw
:
true
});
if
(
!
(
jsqtzjc
&&
jsqtzjc
.
id
&&
jsqtzjc
.
projectId
))
{
if
(
!
(
jsqtzjc
&&
jsqtzjc
.
id
&&
jsqtzjc
.
projectId
))
{
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
}
}
...
@@ -880,11 +880,24 @@ async function getJsqtzjcList(req, res, next) {
...
@@ -880,11 +880,24 @@ async function getJsqtzjcList(req, res, next) {
// }
// }
// }
// }
search
.
where
=
where
;
search
.
where
=
where
;
search
.
raw
=
true
;
if
(
req
.
body
.
attributes
&&
req
.
body
.
attributes
.
length
)
{
if
(
req
.
body
.
attributes
&&
req
.
body
.
attributes
.
length
)
{
search
.
attributes
=
req
.
body
.
attributes
;
search
.
attributes
=
req
.
body
.
attributes
;
}
}
let
ret
=
await
DB
.
TzJsqtzjc
.
findAndCountAll
(
search
);
let
ret
=
await
DB
.
TzJsqtzjc
.
findAndCountAll
(
search
);
let
tzjcIds
=
[];
ret
.
rows
.
map
(
o
=>
{
tzjcIds
.
push
(
o
.
id
);
});
let
jsqtzjcTzfxs
=
await
DB
.
TzJsqtzjcTzfx
.
findAll
({
where
:
{
sourceId
:
{[
Op
.
in
]:
tzjcIds
}
},
raw
:
true
});
let
jsqtzjcZxjcs
=
await
DB
.
TzJsqtzjcZxjc
.
findAll
({
where
:
{
sourceId
:
{[
Op
.
in
]:
tzjcIds
}
},
raw
:
true
});
let
tzfxsmap
=
_
.
groupBy
(
jsqtzjcTzfxs
,
'sourceId'
);
let
tzzxjcmap
=
_
.
groupBy
(
jsqtzjcZxjcs
,
'sourceId'
);
// console.log(tzfxsmap, "===")
ret
.
rows
=
ret
.
rows
.
map
(
o
=>
{
o
.
jsqtzjcTzfxs
=
tzfxsmap
[
String
(
o
.
id
)]
||
[];
console
.
log
(
o
.
jsqtzjcTzfxs
)
o
.
jsqtzjcZxjcs
=
tzzxjcmap
[
String
(
o
.
id
)]
||
[];
return
o
;
});
return
res
.
sendData
(
ret
);
return
res
.
sendData
(
ret
);
}
catch
(
error
)
{
}
catch
(
error
)
{
next
(
error
);
next
(
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