明树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
ccb3856e
Commit
ccb3856e
authored
Dec 30, 2025
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
742f9ba0
Pipeline
#105417
passed with stage
in 3 seconds
Changes
7
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
321 additions
and
36 deletions
+321
-36
projectTzController.js
controller/projectTzController.js
+161
-35
index.js
db/index.js
+4
-0
tzJsqtzjc.js
db/model/jt/tzJsqtzjc.js
+5
-0
tzXmtc.js
db/model/jt/tzXmtc.js
+74
-0
tzXmtcCwzb.js
db/model/jt/tzXmtcCwzb.js
+65
-0
tzZdsxsp.js
db/model/jt/tzZdsxsp.js
+5
-1
projectRouter.js
router/projectRouter.js
+7
-0
No files found.
controller/projectTzController.js
View file @
ccb3856e
This diff is collapsed.
Click to expand it.
db/index.js
View file @
ccb3856e
...
@@ -61,6 +61,8 @@ const TzJsqtzjcZxjc = require("./model/jt/tzJsqtzjcZxjc");
...
@@ -61,6 +61,8 @@ const TzJsqtzjcZxjc = require("./model/jt/tzJsqtzjcZxjc");
const
TzZdsxsp
=
require
(
"./model/jt/tzZdsxsp"
);
const
TzZdsxsp
=
require
(
"./model/jt/tzZdsxsp"
);
const
TzZdsxspfl
=
require
(
"./model/jt/tzZdsxspfl"
);
const
TzZdsxspfl
=
require
(
"./model/jt/tzZdsxspfl"
);
const
TzXmtc
=
require
(
"./model/jt/tzXmtc"
);
const
TzXmtcCwzb
=
require
(
"./model/jt/tzXmtcCwzb"
);
/**
/**
* 业务表
* 业务表
...
@@ -120,6 +122,8 @@ global.DB = {
...
@@ -120,6 +122,8 @@ global.DB = {
TzJsqtzjcZxjc
,
TzJsqtzjcZxjc
,
TzZdsxsp
,
TzZdsxsp
,
TzZdsxspfl
,
TzZdsxspfl
,
TzXmtc
,
TzXmtcCwzb
,
}
}
...
...
db/model/jt/tzJsqtzjc.js
View file @
ccb3856e
...
@@ -9,6 +9,11 @@ const TzJsqtzjc = sequelize.define('TzJsqtzjc', {
...
@@ -9,6 +9,11 @@ const TzJsqtzjc = sequelize.define('TzJsqtzjc', {
primaryKey
:
true
,
primaryKey
:
true
,
autoIncrement
:
true
autoIncrement
:
true
},
},
projectName
:
{
type
:
DataTypes
.
STRING
,
comment
:
"项目名称"
,
},
jcztz
:
{
jcztz
:
{
type
:
DataTypes
.
DECIMAL
(
20
,
2
),
type
:
DataTypes
.
DECIMAL
(
20
,
2
),
comment
:
"决策总投资 一次填报锁定"
comment
:
"决策总投资 一次填报锁定"
...
...
db/model/jt/tzXmtc.js
0 → 100644
View file @
ccb3856e
const
{
DataTypes
}
=
require
(
'sequelize'
);
const
sequelize
=
require
(
'../index'
);
const
moment
=
require
(
'moment'
);
//投中管理- 重大事项审批
const
TzXmtc
=
sequelize
.
define
(
'TzXmtc'
,
{
id
:
{
type
:
DataTypes
.
INTEGER
,
primaryKey
:
true
,
autoIncrement
:
true
},
/* -------------------TODO: 缺少内容------------------------------------- */
projectName
:
{
type
:
DataTypes
.
STRING
,
comment
:
"项目名称"
,
},
tcfs
:
{
type
:
DataTypes
.
STRING
,
comment
:
"退出方式"
},
sjtcrq
:
{
type
:
DataTypes
.
DATE
,
comment
:
"实际退出日期"
},
tcwj
:
{
type
:
DataTypes
.
JSON
,
comment
:
"退出相关文件"
},
projectId
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"所属项目ID"
,
},
del
:
{
type
:
DataTypes
.
INTEGER
,
defaultValue
:
0
,
comment
:
"0 正常 1 删除"
},
createdAt
:
{
type
:
DataTypes
.
DATE
,
defaultValue
:
new
Date
(),
get
()
{
const
rawValue
=
this
.
getDataValue
(
'createdAt'
);
return
rawValue
?
moment
(
rawValue
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
;
}
},
updatedAt
:
{
// 同样处理 updatedAt
type
:
DataTypes
.
DATE
,
defaultValue
:
new
Date
(),
get
()
{
const
rawValue
=
this
.
getDataValue
(
'updatedAt'
);
return
rawValue
?
moment
(
rawValue
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
;
}
}
},
{
tableName
:
'jt_tz_xmtc'
,
// 指定表名(如果与模型名不同)
timestamps
:
true
,
// 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
TzXmtc
.
sync
({
// force: false,
// force: true ,//会删除已存在表并重新创建
alter
:
true
})
.
then
(()
=>
{
console
.
log
(
'TzXmtc 表同步成功'
);
});
module
.
exports
=
TzXmtc
;
\ No newline at end of file
db/model/jt/tzXmtcCwzb.js
0 → 100644
View file @
ccb3856e
const
{
DataTypes
}
=
require
(
'sequelize'
);
const
sequelize
=
require
(
'../index'
);
const
moment
=
require
(
'moment'
);
//投中管理- 重大事项审批
const
TzXmtcCwzb
=
sequelize
.
define
(
'TzXmtcCwzb'
,
{
id
:
{
type
:
DataTypes
.
INTEGER
,
primaryKey
:
true
,
autoIncrement
:
true
},
/* -------------------TODO: 缺少内容------------------------------------- */
zbmc
:
{
type
:
DataTypes
.
STRING
,
comment
:
"指标名称"
,
},
zbsz
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"指标数值"
,
},
projectId
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"所属项目ID"
,
},
del
:
{
type
:
DataTypes
.
INTEGER
,
defaultValue
:
0
,
comment
:
"0 正常 1 删除"
},
createdAt
:
{
type
:
DataTypes
.
DATE
,
defaultValue
:
new
Date
(),
get
()
{
const
rawValue
=
this
.
getDataValue
(
'createdAt'
);
return
rawValue
?
moment
(
rawValue
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
;
}
},
updatedAt
:
{
// 同样处理 updatedAt
type
:
DataTypes
.
DATE
,
defaultValue
:
new
Date
(),
get
()
{
const
rawValue
=
this
.
getDataValue
(
'updatedAt'
);
return
rawValue
?
moment
(
rawValue
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
;
}
}
},
{
tableName
:
'jt_tz_xmtccwzb'
,
// 指定表名(如果与模型名不同)
timestamps
:
true
,
// 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
TzXmtcCwzb
.
sync
({
// force: false,
// force: true ,//会删除已存在表并重新创建
alter
:
true
})
.
then
(()
=>
{
console
.
log
(
'TzXmtcCwzb 表同步成功'
);
});
module
.
exports
=
TzXmtcCwzb
;
\ No newline at end of file
db/model/jt/tzZdsxsp.js
View file @
ccb3856e
...
@@ -9,8 +9,12 @@ const TzZdsxsp = sequelize.define('TzZdsxsp', {
...
@@ -9,8 +9,12 @@ const TzZdsxsp = sequelize.define('TzZdsxsp', {
primaryKey
:
true
,
primaryKey
:
true
,
autoIncrement
:
true
autoIncrement
:
true
},
},
/* -------------------------------------------------------- */
/* -------------------TODO: 缺少内容------------------------------------- */
projectName
:
{
type
:
DataTypes
.
STRING
,
comment
:
"项目名称"
,
},
projectId
:
{
projectId
:
{
type
:
DataTypes
.
INTEGER
,
type
:
DataTypes
.
INTEGER
,
...
...
router/projectRouter.js
View file @
ccb3856e
...
@@ -85,4 +85,11 @@ router.post('/getZdsxspList', projectTzController.getZdsxspList);
...
@@ -85,4 +85,11 @@ router.post('/getZdsxspList', projectTzController.getZdsxspList);
router
.
post
(
'/getZdsxspInfo'
,
projectTzController
.
getZdsxspInfo
);
router
.
post
(
'/getZdsxspInfo'
,
projectTzController
.
getZdsxspInfo
);
//项目退出
router
.
post
(
'/createXmtc'
,
projectTzController
.
createXmtc
);
router
.
post
(
'/updateXmtc'
,
projectTzController
.
updateXmtc
);
router
.
post
(
'/getXmtcList'
,
projectTzController
.
getXmtcList
);
router
.
post
(
'/getXmtcInfo'
,
projectTzController
.
getXmtcInfo
);
module
.
exports
=
router
;
module
.
exports
=
router
;
\ 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