明树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
8ea4a304
Commit
8ea4a304
authored
Jan 19, 2026
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
54ee709e
Pipeline
#106323
passed with stage
in 3 seconds
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
28 deletions
+40
-28
projectQtController.js
controller/projectQtController.js
+1
-1
projectThController.js
controller/projectThController.js
+10
-10
index.js
db/index.js
+8
-2
rcCgqygl.js
db/model/jt/rcCgqygl.js
+8
-8
rcCgqyglTzfh.js
db/model/jt/rcCgqyglTzfh.js
+4
-1
rcCgqyglWtyy.js
db/model/jt/rcCgqyglWtyy.js
+9
-6
No files found.
controller/projectQtController.js
View file @
8ea4a304
...
...
@@ -24,6 +24,7 @@ async function createCgqygl(req, res, next) {
// 投资分红
let
tzfhs
=
(
req
.
body
.
tzfhs
||
[]).
map
(
o
=>
{
o
.
projectId
=
req
.
body
.
projectId
;
o
.
sourceId
=
ret
.
id
;
return
o
});
console
.
log
(
tzfhs
,
"==="
)
if
(
tzfhs
.
length
)
await
DB
.
RcCgqyglTzfh
.
bulkCreate
(
tzfhs
);
// 委托运营
...
...
@@ -71,7 +72,6 @@ async function getCgqygl(req, res, next) {
try
{
let
search
=
{};
if
(
req
.
body
.
id
)
search
.
id
=
req
.
body
.
id
;
if
(
req
.
body
.
projectId
)
search
.
projectId
=
req
.
body
.
projectId
;
if
(
_
.
isEmpty
(
search
))
return
res
.
sendError
(
errorMessage
.
paramsError
);
let
info
=
await
DB
.
RcCgqygl
.
findOne
({
where
:
search
,
raw
:
true
});
...
...
controller/projectThController.js
View file @
8ea4a304
...
...
@@ -512,16 +512,16 @@ async function getYjglInfo(req, res, next) {
if
(
!
(
yjgl
&&
yjgl
.
id
))
{
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
}
let
fileIds
=
[].
concat
(
yjgl
.
zbyzyj
).
concat
(
yjgl
.
qzlyzzyj
).
concat
(
yjgl
.
qmyj
);
let
files
=
await
DB
.
File
.
findAll
({
where
:
{
id
:
{
[
Op
.
in
]:
fileIds
}
},
raw
:
true
});
let
fileMap
=
[];
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
const
element
=
files
[
index
];
fileMap
[
element
.
id
]
=
element
;
}
yjgl
.
zbyzyj
=
(
yjgl
.
zbyzyj
||
[]).
map
(
o
=>
{
return
fileMap
[
o
]
});
yjgl
.
qzlyzzyj
=
yjgl
.
qzlyzzyj
.
map
(
o
=>
{
return
fileMap
[
o
]
});
yjgl
.
qmyj
=
yjgl
.
qmyj
.
map
(
o
=>
{
return
fileMap
[
o
]
});
//
let fileIds = [].concat(yjgl.zbyzyj).concat(yjgl.qzlyzzyj).concat(yjgl.qmyj);
//
let files = await DB.File.findAll({ where: { id: { [Op.in]: fileIds } }, raw: true });
//
let fileMap = [];
//
for (let index = 0; index < files.length; index++) {
//
const element = files[index];
//
fileMap[element.id] = element;
//
}
//
yjgl.zbyzyj = (yjgl.zbyzyj || []).map(o => { return fileMap[o] });
//
yjgl.qzlyzzyj = yjgl.qzlyzzyj.map(o => { return fileMap[o] });
//
yjgl.qmyj = yjgl.qmyj.map(o => { return fileMap[o] });
return
res
.
sendData
(
yjgl
);
}
catch
(
error
)
{
next
(
error
);
...
...
db/index.js
View file @
8ea4a304
...
...
@@ -76,11 +76,13 @@ const ThYyqtzjc = require('./model/jt/thYyqtzjc');
const
ThYyqtzjcTzfx
=
require
(
'./model/jt/thYyqtzjcTzfx'
);
const
ThYyqtzjcZxjc
=
require
(
'./model/jt/thYyqtzjcZxjc'
);
const
ThYyqtzjcrcjc
=
require
(
'./model/jt/thYyqtzjcrcjc'
);
const
ThYjgl
=
require
(
"./model/jt/thYjgl"
);
const
RcTxjs
=
require
(
'./model/jt/rcTxjs'
);
const
RcTxjsWj
=
require
(
'./model/jt/rcTxjswj'
);
const
RcCgqygl
=
require
(
'./model/jt/rcCgqygl'
);
const
RcCgqyglTzfh
=
require
(
'./model/jt/rcCgqygltzfh'
);
const
RcCgqyglWtyy
=
require
(
'./model/jt/rcCgqyglWtyy'
);
/**
* 业务表
*/
...
...
@@ -156,9 +158,13 @@ global.DB = {
ThYyqtzjcTzfx
,
ThYyqtzjcZxjc
,
ThYyqtzjcrcjc
,
ThYjgl
,
RcTxjs
,
RcTxjsWj
,
RcCgqygl
,
RcCgqyglTzfh
,
RcCgqyglWtyy
,
}
...
...
db/model/jt/rcCgqygl.js
View file @
8ea4a304
...
...
@@ -34,14 +34,14 @@ const RcCgqygl = sequelize.define('RcCgqygl', {
type
:
DataTypes
.
STRING
,
comment
:
"股权结构"
},
dcqk
:
{
type
:
DataTypes
.
STRING
,
comment
:
"代持情况"
},
sjcgbl
:
{
type
:
DataTypes
.
DECIMAL
(
5
,
2
),
comment
:
"实际持股比例"
},
//
dcqk: {
//
type: DataTypes.STRING,
//
comment: "代持情况"
//
},
//
sjcgbl: {
//
type: DataTypes.DECIMAL(5, 2),
//
comment: "实际持股比例"
//
},
xmzbjze
:
{
type
:
DataTypes
.
DECIMAL
(
20
,
8
),
...
...
db/model/jt/rcCgqyglTzfh.js
View file @
8ea4a304
...
...
@@ -22,7 +22,10 @@ const RcCgqyglTzfh = sequelize.define('RcCgqyglTzfh', {
type
:
DataTypes
.
DECIMAL
(
20
,
8
),
comment
:
"分红金额"
},
sourceId
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"所属主表id"
},
projectId
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"所属项目ID"
,
...
...
db/model/jt/rcCgqyglWtyy.js
View file @
8ea4a304
...
...
@@ -3,7 +3,7 @@ const sequelize = require('../index');
const
moment
=
require
(
'moment'
);
//投中管理- 建设期投资检查
const
RcCgqygl
Tzfh
=
sequelize
.
define
(
'RcCgqyglTzfh
'
,
{
const
RcCgqygl
Wtyy
=
sequelize
.
define
(
'RcCgqyglWtyy
'
,
{
id
:
{
type
:
DataTypes
.
INTEGER
,
primaryKey
:
true
,
...
...
@@ -30,7 +30,10 @@ const RcCgqyglTzfh = sequelize.define('RcCgqyglTzfh', {
type
:
DataTypes
.
DECIMAL
(
20
,
8
),
comment
:
"业务利润"
},
sourceId
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"所属主表id"
},
projectId
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"所属项目ID"
,
...
...
@@ -57,19 +60,19 @@ const RcCgqyglTzfh = sequelize.define('RcCgqyglTzfh', {
}
}
},
{
tableName
:
'jt_rc_cgqygl
tzfh
'
,
// 指定表名(如果与模型名不同)
tableName
:
'jt_rc_cgqygl
wtyy
'
,
// 指定表名(如果与模型名不同)
timestamps
:
true
,
// 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
RcCgqygl
Tzfh
.
sync
({
RcCgqygl
Wtyy
.
sync
({
// force: false,
// force: true ,//会删除已存在表并重新创建
alter
:
true
})
.
then
(()
=>
{
console
.
log
(
'RcCgqygl
Tzfh
表同步成功'
);
console
.
log
(
'RcCgqygl
Wtyy
表同步成功'
);
});
module
.
exports
=
RcCgqyglTzfh
;
\ No newline at end of file
module
.
exports
=
RcCgqyglWtyy
;
\ No newline at end of file
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