明树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
a646b618
Commit
a646b618
authored
Dec 10, 2025
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c55cfb74
Pipeline
#104448
passed with stage
in 3 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
7 deletions
+3
-7
projectController.js
controller/projectController.js
+0
-3
resourceController.js
controller/resourceController.js
+0
-1
projectModule.js
module/projectModule.js
+3
-3
No files found.
controller/projectController.js
View file @
a646b618
...
...
@@ -130,7 +130,6 @@ async function createProject(req, res, next) {
xgshcl
=
xgshcl
.
map
(
o
=>
{
return
{
fileId
:
o
.
id
,
projectId
:
project
.
id
,
proFieldKey
:
'xgshcl'
}
});
// 处理文件
let
proFiles
=
_
.
concat
(
lxzl
,
lxpfwj
,
xgshcl
);
console
.
log
(
proFiles
,
"================="
)
await
DB
.
ProjectFile
.
bulkCreate
(
proFiles
);
...
...
@@ -159,7 +158,6 @@ async function createProject(req, res, next) {
// // });
// await DB.Project.update({ projectLzType: 3 }, { where: { id: project.id } });
// }
console
.
log
(
project
)
return
res
.
sendData
(
project
);
}
catch
(
error
)
{
next
(
error
);
...
...
@@ -395,7 +393,6 @@ async function xiangmujuecegengxin(body, projectLzType) {
// 处理 projectCwpjzb
let
projectCwpjzbs
=
body
.
projectCwpjzbs
||
[];
console
.
log
(
body
.
projectCwpjzbs
,
"===================================================================="
)
let
pnids10
=
[],
pns10
=
[],
newprojectCwpjzbs
=
[];
projectCwpjzbs
.
map
(
o
=>
{
if
(
!
o
.
id
)
{
if
(
!
_
.
isEmpty
(
o
))
{
o
.
projectId
=
projectInfo
.
id
;
newprojectCwpjzbs
.
push
(
o
);
}
}
else
{
pnids10
.
push
(
o
.
id
);
pns10
.
push
(
o
);
}
return
o
});
await
DB
.
ProjectCwpjzb
.
destroy
({
where
:
{
projectId
:
projectInfo
.
id
,
id
:
{
[
Op
.
notIn
]:
pnids10
}
}
});
...
...
controller/resourceController.js
View file @
a646b618
...
...
@@ -11,7 +11,6 @@ async function createResource(req, res, next) {
const
body
=
req
.
body
;
let
ret
=
await
DB
.
Resources
.
create
(
body
);
ret
=
ret
.
toJSON
();
console
.
log
(
ret
);
if
(
body
.
resourceInfos
&&
body
.
resourceInfos
.
length
&&
ret
.
id
)
{
if
(
body
.
type
==
1
){
let
ris
=
[];
...
...
module/projectModule.js
View file @
a646b618
...
...
@@ -47,16 +47,16 @@ async function handleProjectData(ret, queryAttrs) {
}
}
console
.
log
(
resouInfoIds
,
",,,,,"
)
//
console.log(resouInfoIds, ",,,,,")
let
resMap
=
await
getResourceInfoByIds
(
resouInfoIds
);
console
.
log
(
resMap
)
//
console.log(resMap)
for
(
let
index
=
0
;
index
<
ret
.
rows
.
length
;
index
++
)
{
const
element
=
ret
.
rows
[
index
];
for
(
const
key
in
element
)
{
// console.log(element, element[key], rawAttributes[key].zjType);
if
(
_
.
isNumber
(
element
[
key
])
&&
rawAttributes
[
key
].
zjType
)
{
if
(
rawAttributes
[
key
].
zjType
==
"danxuan"
)
{
console
.
log
(
resMap
[
String
(
element
[
key
])],
String
(
element
[
key
]),
"========================="
)
//
console.log(resMap[String(element[key])], String(element[key]), "=========================")
element
[
key
]
=
resMap
[
String
(
element
[
key
])];
}
else
if
(
rawAttributes
[
key
].
zjType
==
"duoxuan"
)
{
if
(
_
.
isArray
(
element
[
key
])
&&
element
[
key
].
length
>
0
)
{
...
...
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