明树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
d52c296e
Commit
d52c296e
authored
Jan 13, 2026
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
!
parent
52707264
Pipeline
#106047
passed with stage
in 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
projectTzController.js
controller/projectTzController.js
+2
-1
tzZdsxsp.js
db/model/jt/tzZdsxsp.js
+20
-0
No files found.
controller/projectTzController.js
View file @
d52c296e
...
...
@@ -28,7 +28,7 @@ async function createTzmbzrs(req, res, next) {
//处理 批复意见
let
tzmbzrsPfyjs
=
(
req
.
body
.
tzmbzrsPfyjs
||
[]).
map
(
o
=>
{
o
.
projectId
=
req
.
body
.
projectId
;
o
.
sourceId
=
ret
.
id
;
return
o
});
//处理 年度经营责任书
let
tzmbzrsNds
=
(
req
.
body
.
tzmbzrs
Pfyj
s
||
[]).
map
(
o
=>
{
let
tzmbzrsNds
=
(
req
.
body
.
tzmbzrs
Nd
s
||
[]).
map
(
o
=>
{
o
.
projectId
=
req
.
body
.
projectId
;
o
.
sourceId
=
ret
.
id
;
// o.jyglzrs = o.jyglzrs || [];
...
...
@@ -85,6 +85,7 @@ async function updateTzmbzrs(req, res, next) {
await
DB
.
TzTzmbzrsPfyj
.
destroy
({
where
:
{
projectId
:
req
.
body
.
projectId
,
sourceId
:
ret
.
id
,
id
:
{
[
Op
.
notIn
]:
ids1
}
}
});
// 删除id不在传入id数组里面的(用户在界面删除的)
await
DB
.
TzTzmbzrsPfyj
.
bulkCreate
(
newtzmbzrsPfyjs
);
//创建新的 没有id的
await
Promise
.
all
(
infos1
.
map
(
item
=>
{
return
DB
.
TzTzmbzrsPfyj
.
update
(
item
,
{
where
:
{
id
:
item
.
id
}
})
}));
// 更新年度经营
let
ids2
=
[],
infos2
=
[],
newtzmbzrsNds
=
[];
tzmbzrsNds
.
map
(
o
=>
{
if
(
!
o
.
id
)
{
if
(
!
_
.
isEmpty
(
o
))
{
o
.
projectId
=
req
.
body
.
projectId
;
o
.
sourceId
=
ret
.
id
;
newtzmbzrsNds
.
push
(
o
);
}
}
else
{
ids2
.
push
(
o
.
id
);
infos2
.
push
(
o
);
}
return
o
});
await
DB
.
TzTzmbzrsNd
.
destroy
({
where
:
{
projectId
:
req
.
body
.
projectId
,
sourceId
:
ret
.
id
,
id
:
{
[
Op
.
notIn
]:
ids2
}
}
});
// 删除id不在传入id数组里面的(用户在界面删除的)
...
...
db/model/jt/tzZdsxsp.js
View file @
d52c296e
...
...
@@ -20,6 +20,26 @@ const TzZdsxsp = sequelize.define('TzZdsxsp', {
type
:
DataTypes
.
JSON
,
comment
:
"权益类合同"
},
jjlht
:
{
type
:
DataTypes
.
JSON
,
comment
:
"经济类合同"
},
zjwj
:
{
type
:
DataTypes
.
JSON
,
comment
:
"造价文件"
},
ybfspwj
:
{
type
:
DataTypes
.
JSON
,
comment
:
"动用预备费审批文件"
},
cwjr
:
{
type
:
DataTypes
.
JSON
,
comment
:
"接入财务金融部资本金出资台账,台账更新,系统上跟着更新"
},
gqjg
:
{
type
:
DataTypes
.
JSON
,
comment
:
"股权结构、资金来源及构成发生重大变化的报告及审批文件"
},
projectId
:
{
type
:
DataTypes
.
INTEGER
,
...
...
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