明树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
fbffa97a
Commit
fbffa97a
authored
Jan 13, 2026
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f6f13ba4
Pipeline
#106054
passed with stage
in 3 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
+30
-8
projectTzController.js
controller/projectTzController.js
+26
-6
tzTzkzTzekz.js
db/model/jt/tzTzkzTzekz.js
+4
-2
No files found.
controller/projectTzController.js
View file @
fbffa97a
...
@@ -206,11 +206,15 @@ async function createTzkz(req, res, next) {
...
@@ -206,11 +206,15 @@ async function createTzkz(req, res, next) {
delete
req
.
body
.
tzkztzekzs
;
delete
req
.
body
.
tzkztzekzs
;
for
(
let
index
=
0
;
index
<
tzkztzekzs
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
tzkztzekzs
.
length
;
index
++
)
{
const
element
=
tzkztzekzs
[
index
];
const
element
=
tzkztzekzs
[
index
];
for
(
let
i
=
0
;
i
<
element
.
length
;
i
++
)
{
element
.
tables
=
element
.
tables
||
[];
let
ei
=
element
[
i
];
for
(
let
i
=
0
;
i
<
element
.
tables
.
length
;
i
++
)
{
let
ei
=
element
.
tables
[
i
];
ei
.
groupBy
=
index
;
ei
.
groupBy
=
index
;
ei
.
projectId
=
req
.
body
.
projectId
;
ei
.
projectId
=
req
.
body
.
projectId
;
ei
.
sourceId
=
ret
.
id
;
ei
.
sourceId
=
ret
.
id
;
ei
.
bqsj
=
element
.
bqsj
;
ei
.
sqsj
=
element
.
sqsj
;
ei
.
key
=
element
.
key
;
flattenArr
.
push
(
ei
);
flattenArr
.
push
(
ei
);
}
}
}
}
...
@@ -271,11 +275,15 @@ async function updateTzkz(req, res, next) {
...
@@ -271,11 +275,15 @@ async function updateTzkz(req, res, next) {
let
ids3
=
[],
infos3
=
[],
newtzkztzekzs
=
[];
let
ids3
=
[],
infos3
=
[],
newtzkztzekzs
=
[];
for
(
let
index
=
0
;
index
<
tzkztzekzs
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
tzkztzekzs
.
length
;
index
++
)
{
const
element
=
tzkztzekzs
[
index
];
const
element
=
tzkztzekzs
[
index
];
for
(
let
i
=
0
;
i
<
element
.
length
;
i
++
)
{
element
.
tables
=
element
.
tables
||
[];
let
ei
=
element
[
i
];
for
(
let
i
=
0
;
i
<
element
.
tables
.
length
;
i
++
)
{
let
ei
=
element
.
tables
[
i
];
ei
.
groupBy
=
index
;
ei
.
groupBy
=
index
;
ei
.
projectId
=
req
.
body
.
projectId
;
ei
.
projectId
=
req
.
body
.
projectId
;
ei
.
sourceId
=
ret
.
id
;
ei
.
sourceId
=
ret
.
id
;
ei
.
bqsj
=
element
.
bqsj
;
ei
.
sqsj
=
element
.
sqsj
;
ei
.
key
=
element
.
key
;
if
(
!
ei
.
id
)
{
if
(
!
ei
.
id
)
{
if
(
!
_
.
isEmpty
(
ei
))
{
if
(
!
_
.
isEmpty
(
ei
))
{
newtzkztzekzs
.
push
(
ei
);
newtzkztzekzs
.
push
(
ei
);
...
@@ -388,8 +396,20 @@ async function getTzkzInfo(req, res, next) {
...
@@ -388,8 +396,20 @@ async function getTzkzInfo(req, res, next) {
where
:
{
projectId
:
tzkz
.
projectId
,
sourceId
:
tzkz
.
id
},
where
:
{
projectId
:
tzkz
.
projectId
,
sourceId
:
tzkz
.
id
},
raw
:
true
raw
:
true
});
});
tzkz
.
tzkztzekzs
=
_
.
values
(
_
.
groupBy
(
tzkztzekzs
,
'groupBy'
))
||
[[]]
let
tzeGroupByObj
=
_
.
groupBy
(
tzkztzekzs
,
'groupBy'
);
let
keyindexs
=
_
.
keys
(
tzeGroupByObj
);
let
newTze
=
[];
for
(
let
index
=
0
;
index
<
keyindexs
.
length
;
index
++
)
{
const
element
=
keyindexs
[
index
];
let
obj
=
{
tables
:
tzeGroupByObj
[
element
],
bqsj
:
tzeGroupByObj
[
element
]
&&
tzeGroupByObj
[
element
][
0
]
&&
tzeGroupByObj
[
element
][
0
].
bqsj
,
sqsj
:
tzeGroupByObj
[
element
]
&&
tzeGroupByObj
[
element
][
0
]
&&
tzeGroupByObj
[
element
][
0
].
sqsj
,
key
:
tzeGroupByObj
[
element
]
&&
tzeGroupByObj
[
element
][
0
]
&&
tzeGroupByObj
[
element
][
0
].
key
,
};
newTze
.
push
(
obj
);
}
tzkz
.
tzkztzekzs
=
newTze
;
return
res
.
sendData
(
tzkz
);
return
res
.
sendData
(
tzkz
);
}
catch
(
error
)
{
}
catch
(
error
)
{
next
(
error
);
next
(
error
);
...
...
db/model/jt/tzTzkzTzekz.js
View file @
fbffa97a
...
@@ -34,7 +34,7 @@ const TzTzkzTzekz = sequelize.define('TzTzkzTzekz', {
...
@@ -34,7 +34,7 @@ const TzTzkzTzekz = sequelize.define('TzTzkzTzekz', {
comment
:
"批复概算"
,
comment
:
"批复概算"
,
},
},
tkjgs
:
{
tkjgs
:
{
type
:
DataTypes
.
DECIMAL
(
20
,
8
),
type
:
DataTypes
.
DECIMAL
(
20
,
8
),
comment
:
"同口径概算"
,
comment
:
"同口径概算"
,
},
},
pfys
:
{
pfys
:
{
...
@@ -77,7 +77,9 @@ const TzTzkzTzekz = sequelize.define('TzTzkzTzekz', {
...
@@ -77,7 +77,9 @@ const TzTzkzTzekz = sequelize.define('TzTzkzTzekz', {
type
:
DataTypes
.
STRING
,
type
:
DataTypes
.
STRING
,
comment
:
"竣工决算审计"
,
comment
:
"竣工决算审计"
,
},
},
key
:
{
type
:
DataTypes
.
STRING
,
},
// tzkzId: {
// tzkzId: {
// type: DataTypes.INTEGER,
// type: DataTypes.INTEGER,
// comment: "所属投资控制主表id",
// comment: "所属投资控制主表id",
...
...
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