明树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
e7e76c1d
Commit
e7e76c1d
authored
Dec 03, 2025
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ea7ee014
Pipeline
#104070
passed with stage
in 3 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
51 deletions
+68
-51
projectController.js
controller/projectController.js
+16
-16
project.js
db/model/jt/project.js
+52
-35
No files found.
controller/projectController.js
View file @
e7e76c1d
...
@@ -10,21 +10,21 @@ async function getProjectFields(req, res, next) {
...
@@ -10,21 +10,21 @@ async function getProjectFields(req, res, next) {
let
rawAttributes
=
DB
.
Project
.
rawAttributes
;
let
rawAttributes
=
DB
.
Project
.
rawAttributes
;
let
obj
=
{
let
obj
=
{
xmjbxx
:
'项目基本信息'
,
xmjbxx
:
'项目基本信息'
,
jcpfxx
:
'决策及批复信息'
,
//
jcpfxx: '决策及批复信息',
xmgslspfxx
:
'项目公司落实批复信息'
,
//
xmgslspfxx: '项目公司落实批复信息',
xmfhhgxffj
:
'项目合法合规性附件'
,
//
xmfhhgxffj: '项目合法合规性附件',
qshmkchw
:
'全生命周期策划文件'
,
//
qshmkchw: '全生命周期策划文件',
xmjxxpj
:
'项目绩效评价'
,
//
xmjxxpj: '项目绩效评价',
mbzrskh
:
'目标责任书考核'
,
//
mbzrskh: '目标责任书考核',
hpj
:
'后评价'
,
//
hpj: '后评价',
zdsxsb
:
'重大事项上报'
,
//
zdsxsb: '重大事项上报',
tzfx
:
'投资分析'
,
//
tzfx: '投资分析',
tzjc
:
'投资检查'
,
//
tzjc: '投资检查',
tzhs
:
'投资核算'
,
//
tzhs: '投资核算',
system
:
'系统字段'
,
//
system: '系统字段',
glfsj
:
'管理费上缴'
,
//
glfsj: '管理费上缴',
pppzgfa
:
'PPP资格认定方案'
,
//
pppzgfa: 'PPP资格认定方案',
xmjs
:
'项目结束/暂停(备案资料)'
,
//
xmjs: '项目结束/暂停(备案资料)',
};
};
for
(
const
key
in
rawAttributes
)
{
for
(
const
key
in
rawAttributes
)
{
let
element
=
_
.
pick
(
rawAttributes
[
key
],
[
'comment'
,
'_mark'
,
'fieldName'
]);
let
element
=
_
.
pick
(
rawAttributes
[
key
],
[
'comment'
,
'_mark'
,
'fieldName'
]);
...
@@ -33,7 +33,7 @@ async function getProjectFields(req, res, next) {
...
@@ -33,7 +33,7 @@ async function getProjectFields(req, res, next) {
}
}
let
attributes
=
_
.
groupBy
(
rawAttributes
,
'_mark'
);
let
attributes
=
_
.
groupBy
(
rawAttributes
,
'_mark'
);
let
ret
=
[];
let
ret
=
[];
for
(
const
key
in
attributes
)
{
for
(
const
key
in
obj
)
{
let
element
=
attributes
[
key
];
let
element
=
attributes
[
key
];
ret
.
push
({
ret
.
push
({
key
:
key
,
key
:
key
,
...
...
db/model/jt/project.js
View file @
e7e76c1d
...
@@ -100,37 +100,37 @@ const Project = sequelize.define('Project', {
...
@@ -100,37 +100,37 @@ const Project = sequelize.define('Project', {
/*------------------------------------------------------- */
/*------------------------------------------------------- */
//项目基本信息
//项目基本信息
projectName
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目名称"
},
projectName
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目名称"
,
_mark
:
"xmjbxx"
},
projectCode
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目编号"
},
projectCode
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目编号"
,
_mark
:
"xmjbxx"
},
cym
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"曾用名"
},
cym
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"曾用名"
,
_mark
:
"xmjbxx"
},
sfzjc
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否再决策"
,
zjType
:
'xiala'
,
zjKey
:
'sf'
},
// 1是 2 否
sfzjc
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否再决策"
,
zjType
:
'xiala'
,
zjKey
:
'sf'
,
_mark
:
"xmjbxx"
},
// 1是 2 否
projectForeignName
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目外文名称"
},
projectForeignName
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目外文名称"
,
_mark
:
"xmjbxx"
},
sfnjlhtxm
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否能建联合体项目"
,
zjType
:
'xiala'
,
zjKey
:
'sf'
},
// 1是 2 否
sfnjlhtxm
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否能建联合体项目"
,
zjType
:
'xiala'
,
zjKey
:
'sf'
,
_mark
:
"xmjbxx"
},
// 1是 2 否
applicationUnit
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"申报单位"
},
applicationUnit
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"申报单位"
,
_mark
:
"xmjbxx"
},
zyfzy
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"主业/非主业"
,
zjType
:
'xiala'
},
//TODO:下拉
zyfzy
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"主业/非主业"
,
zjType
:
'xiala'
,
_mark
:
"xmjbxx"
},
//TODO:下拉
zsqy
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"直属企业"
},
zsqy
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"直属企业"
,
_mark
:
"xmjbxx"
},
sfnjzdhzytz
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否能建重大或重要投资"
,
zjType
:
'xiala'
,
zjKey
:
'sf'
},
sfnjzdhzytz
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否能建重大或重要投资"
,
zjType
:
'xiala'
,
zjKey
:
'sf'
,
_mark
:
"xmjbxx"
},
sfzzjc
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否自主决策"
},
sfzzjc
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否自主决策"
,
_mark
:
"xmjbxx"
},
cwbblx
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"财务报表类型"
,
zjType
:
'xiala'
},
//TODO:下拉
cwbblx
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"财务报表类型"
,
zjType
:
'xiala'
,
_mark
:
"xmjbxx"
},
//TODO:下拉
zfsphzbajb
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"政府审批(核准、备案)级别"
,
zjType
:
'xiala'
},
//TODO:下拉
zfsphzbajb
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"政府审批(核准、备案)级别"
,
zjType
:
'xiala'
,
_mark
:
"xmjbxx"
},
//TODO:下拉
sflxbqyscx
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否履行标前预审程序"
,
zjType
:
'xiala'
,
zjKey
:
'sf'
},
sflxbqyscx
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否履行标前预审程序"
,
zjType
:
'xiala'
,
zjKey
:
'sf'
,
_mark
:
"xmjbxx"
},
xmztz
:
{
type
:
DataTypes
.
DECIMAL
(
19
,
8
),
allowNull
:
true
,
comment
:
"项目总投资"
},
xmztz
:
{
type
:
DataTypes
.
DECIMAL
(
19
,
8
),
allowNull
:
true
,
comment
:
"项目总投资"
,
_mark
:
"xmjbxx"
},
glzt
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"管理主体"
},
glzt
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"管理主体"
,
_mark
:
"xmjbxx"
},
tzms
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"投资模式"
},
tzms
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"投资模式"
,
_mark
:
"xmjbxx"
},
dwqypp
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"对外签约品牌"
},
dwqypp
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"对外签约品牌"
,
_mark
:
"xmjbxx"
},
xmzjly
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目资金来源"
},
xmzjly
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目资金来源"
,
_mark
:
"xmjbxx"
},
swbxmlx
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"商务部项目类型"
,
zjType
:
'xiala'
},
//TODO:下拉
swbxmlx
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"商务部项目类型"
,
zjType
:
'xiala'
,
_mark
:
"xmjbxx"
},
//TODO:下拉
xmlx
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目类型"
,
zjType
:
'xiala'
},
//TODO:下拉
xmlx
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目类型"
,
zjType
:
'xiala'
,
_mark
:
"xmjbxx"
},
//TODO:下拉
sfpppxm
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否PPP项目"
,
zjType
:
'xiala'
,
zjKey
:
'sf'
},
sfpppxm
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否PPP项目"
,
zjType
:
'xiala'
,
zjKey
:
'sf'
,
_mark
:
"xmjbxx"
},
//项目所在地
//项目所在地
jnw
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"境内/外"
,
zjType
:
'xiala'
},
//TODO:下拉
jnw
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"境内/外"
,
zjType
:
'xiala'
},
//TODO:下拉
sjnzjjw
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"省(境内)/洲际(境外)"
,
zjType
:
'xiala'
},
//TODO:下拉
sjnzjjw
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"省(境内)/洲际(境外)"
,
zjType
:
'xiala'
},
//TODO:下拉
dsjngjjw
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"地市(境内)/国家(境外)"
,
zjType
:
'xiala'
},
//TODO:下拉
dsjngjjw
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"地市(境内)/国家(境外)"
,
zjType
:
'xiala'
},
//TODO:下拉
qxjngjjw
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"区县(境内)/国家(境外)"
,
zjType
:
'xiala'
},
//TODO:下拉
qxjngjjw
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"区县(境内)/国家(境外)"
,
zjType
:
'xiala'
},
//TODO:下拉
xmqy
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目区域"
,
zjType
:
'xiala'
},
//TODO:下拉
xmqy
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目区域"
,
zjType
:
'xiala'
},
//TODO:下拉
sfydylyxgj
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否一带一路沿线国家"
,
zjType
:
'xiala'
,
zjKey
:
'sf'
},
sfydylyxgj
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"是否一带一路沿线国家"
,
zjType
:
'xiala'
,
zjKey
:
'sf'
},
//计量币种
//计量币种
bizhong
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"币种"
,
zjType
:
'xiala'
},
//TODO:下拉
bizhong
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"币种"
,
zjType
:
'xiala'
},
//TODO:下拉
huilv
:
{
type
:
DataTypes
.
DECIMAL
(
3
,
2
),
allowNull
:
true
,
comment
:
"汇率"
},
huilv
:
{
type
:
DataTypes
.
DECIMAL
(
3
,
2
),
allowNull
:
true
,
comment
:
"汇率"
},
//实施时间
//实施时间
xmjsqy
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目建设期(月)"
},
xmjsqy
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"项目建设期(月)"
},
...
@@ -1762,6 +1762,23 @@ const Project = sequelize.define('Project', {
...
@@ -1762,6 +1762,23 @@ const Project = sequelize.define('Project', {
/* -------------------------------------------------------- */
/* -------------------------------------------------------- */
createdAt
:
{
type
:
DataTypes
.
DATE
,
defaultValue
:
new
Date
(),
get
()
{
const
rawValue
=
this
.
getDataValue
(
'createdAt'
);
return
rawValue
?
moment
(
rawValue
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
;
},
_mark
:
'xmjbxx'
},
updatedAt
:
{
// 同样处理 updatedAt
type
:
DataTypes
.
DATE
,
defaultValue
:
new
Date
(),
get
()
{
const
rawValue
=
this
.
getDataValue
(
'createdAt'
);
return
rawValue
?
moment
(
rawValue
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
;
}
}
},
{
},
{
tableName
:
'jt_project'
,
// 指定表名(如果与模型名不同)
tableName
:
'jt_project'
,
// 指定表名(如果与模型名不同)
timestamps
:
true
,
// 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
timestamps
:
true
,
// 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
...
...
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