明树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
ff46a73d
Commit
ff46a73d
authored
Nov 26, 2025
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
14b33e00
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
329 additions
and
155 deletions
+329
-155
production.json
config/production.json
+17
-5
projectController.js
controller/projectController.js
+156
-90
index.js
db/index.js
+4
-0
c.md
db/model/jt/c.md
+9
-0
project.js
db/model/jt/project.js
+10
-0
projectCwpjzb.js
db/model/jt/projectCwpjzb.js
+1
-1
projectLcbjd.js
db/model/jt/projectLcbjd.js
+1
-1
projectTzzjll.js
db/model/jt/projectTzzjll.js
+1
-1
projectXmtzze.js
db/model/jt/projectXmtzze.js
+57
-57
message.js
db/model/system/message.js
+69
-0
user.js
db/model/system/user.js
+4
-0
No files found.
config/production.json
View file @
ff46a73d
{
"tokenEx"
:
86400
,
"
dbURI"
:
"mongodb://root:letian2024.@127.0.0.1:27017/letian?authSource=admin
"
,
"tokenEx"
:
86400
000000
,
"
userDefaultPassword"
:
"GZB123JT.
"
,
"file"
:
{
"storagePath"
:
"/
mnt/vdb1/
uploadfiles"
"storagePath"
:
"/uploadfiles"
},
"cron"
:
{
"excel"
:
true
},
"mysql"
:
{
"host"
:
"localhost"
,
"port"
:
3306
,
"username"
:
"root"
,
"password"
:
"123456"
,
"database"
:
"gzbjt"
,
"logging"
:
true
},
"redis"
:
{
"host"
:
"localhost"
,
"port"
:
6379
,
"password"
:
""
,
"db"
:
0
}
}
\ No newline at end of file
controller/projectController.js
View file @
ff46a73d
This diff is collapsed.
Click to expand it.
db/index.js
View file @
ff46a73d
...
...
@@ -115,6 +115,10 @@ Position.belongsToMany(User, {
as
:
'users'
});
/**用户-项目 1:n */
User
.
hasMany
(
Project
,
{
foreignKey
:
'projectCreator'
,
as
:
'createdProjects'
});
Project
.
belongsTo
(
User
,
{
foreignKey
:
'projectCreator'
,
as
:
'creator'
});
/**项目-资源信息 1:n */
Resources
.
hasMany
(
ResourcesInfo
,
{
foreignKey
:
'resourceId'
,
as
:
'resourcesInfos'
});
ResourcesInfo
.
belongsTo
(
Resources
,
{
foreignKey
:
'resourceId'
});
...
...
db/model/jt/c.md
0 → 100644
View file @
ff46a73d
1.
项目提交(项目公司、投管) 只能靠角色
1.
1 项目公司新建项目人员---项目公司项目审批人员 --- 投管项目审批人员
项目公司人员 -- 看见本公司所有项目
投管项目审批人员 -- 看见所有项目公司人员
1.
2 投管新建项目 --- 投管
同步发起 一个startFlow 流程记录 发起人 发起时间 项目状态(待审批-已审批)
\ No newline at end of file
db/model/jt/project.js
View file @
ff46a73d
...
...
@@ -2,6 +2,8 @@
const
{
DataTypes
}
=
require
(
'sequelize'
);
const
sequelize
=
require
(
'../index'
);
const
User
=
require
(
'./system/user'
);
const
Project
=
sequelize
.
define
(
'Project'
,
{
// 定义字段
id
:
{
...
...
@@ -11,6 +13,14 @@ const Project = sequelize.define('Project', {
_mark
:
'system'
,
comment
:
"主键ID"
},
projectCreator
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"项目创建人ID"
,
references
:
{
model
:
User
,
key
:
'id'
,
},
},
/**
* 项目基本信息
*/
...
...
db/model/jt/projectCwpjzb.js
View file @
ff46a73d
const
{
DataTypes
}
=
require
(
'sequelize'
);
const
sequelize
=
require
(
'../index'
);
// 财务评价指标
----废弃
// 财务评价指标
const
projectCwpjzb
=
sequelize
.
define
(
'projectCwpjzb'
,
{
id
:
{
type
:
DataTypes
.
INTEGER
,
...
...
db/model/jt/projectLcbjd.js
View file @
ff46a73d
...
...
@@ -10,7 +10,7 @@ const File = require('../system/file');
// zxhfsj: { type: DataTypes.DATE, allowNull: true, comment: "执行回复时间" },
// zxhffj: { type: DataTypes.STRING, allowNull: true, comment: "执行回复附件" },
// wlsqksm: { type: DataTypes.STRING, allowNull: true, comment: "未落实情况说明" },
//
审批意见
//
里程碑节点
const
ProjectLcbjd
=
sequelize
.
define
(
'ProjectLcbjd'
,
{
id
:
{
type
:
DataTypes
.
INTEGER
,
...
...
db/model/jt/projectTzzjll.js
View file @
ff46a73d
...
...
@@ -13,7 +13,7 @@ const ProjectTzzjll = sequelize.define('ProjectTzzjll', {
sdsqjxjll
:
{
type
:
DataTypes
.
DECIMAL
(
19
,
8
),
allowNull
:
true
,
comment
:
"所得税前净现金流量"
},
tzsds
:
{
type
:
DataTypes
.
DECIMAL
(
19
,
8
),
allowNull
:
true
,
comment
:
"调整所得税"
},
sdshjxjll
:
{
type
:
DataTypes
.
DECIMAL
(
19
,
8
),
allowNull
:
true
,
comment
:
"所得税后净现金流量"
},
year
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"
所得税后净现金流量
"
},
year
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
"
年份
"
},
projectId
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"所属项目ID"
,
...
...
db/model/jt/projectXmtzze.js
View file @
ff46a73d
//
const { DataTypes } = require('sequelize');
//
const sequelize = require('../index');
const
{
DataTypes
}
=
require
(
'sequelize'
);
const
sequelize
=
require
(
'../index'
);
//
// 项目总投资总额(全口径)-废弃
//
const ProjectXmtzze = sequelize.define('ProjectXmtzze', {
//
id: {
//
type: DataTypes.INTEGER,
//
primaryKey: true,
//
autoIncrement: true
//
},
//
kid: {
//
type: DataTypes.INTEGER,
//
comment: "表格行ID"
//
},
//
xh: {
//
type: DataTypes.STRING,
//
comment: "序号"
//
},
//
zb: {
//
type: DataTypes.STRING,
//
comment: "指标"
//
},
//
dw: {
//
type: DataTypes.STRING,
//
comment: "单位",
//
defaultValue: "万元"
//
},
//
rmbjj: {
//
type: DataTypes.DECIMAL(20, 4),
//
comment: "人民币计价"
//
},
//
parentId: {
//
type: DataTypes.INTEGER,
//
comment: "上级ID"
//
},
//
项目总投资总额(全口径)
const
ProjectXmtzze
=
sequelize
.
define
(
'ProjectXmtzze'
,
{
id
:
{
type
:
DataTypes
.
INTEGER
,
primaryKey
:
true
,
autoIncrement
:
true
},
//
kid: {
//
type: DataTypes.INTEGER,
//
comment: "表格行ID"
//
},
xh
:
{
type
:
DataTypes
.
STRING
,
comment
:
"序号"
},
zb
:
{
type
:
DataTypes
.
STRING
,
comment
:
"指标"
},
dw
:
{
type
:
DataTypes
.
STRING
,
comment
:
"单位"
,
defaultValue
:
"万元"
},
rmbjj
:
{
type
:
DataTypes
.
DECIMAL
(
20
,
4
),
comment
:
"人民币计价"
},
//
parentId: {
//
type: DataTypes.INTEGER,
//
comment: "上级ID"
//
},
//
projectId: {
//
type: DataTypes.INTEGER,
//
comment: "所属项目ID",
//
},
projectId
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"所属项目ID"
,
},
//
del: {
//
type: DataTypes.INTEGER,
//
defaultValue: 0,
//
comment: "0 正常 1 删除"
//
},
//
}, {
//
tableName: 'jt_project_xmtzze', // 指定表名(如果与模型名不同)
//
timestamps: true, // 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
//
});
del
:
{
type
:
DataTypes
.
INTEGER
,
defaultValue
:
0
,
comment
:
"0 正常 1 删除"
},
},
{
tableName
:
'jt_project_xmtzze'
,
// 指定表名(如果与模型名不同)
timestamps
:
true
,
// 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
//
//
同步模型到数据库(创建表)
//
ProjectXmtzze.sync({
//
force: false,
//
// force: true ,//会删除已存在表并重新创建
//
// alter: true
//
})
//
.then(() => {
//
console.log('ProjectXmtzze 表同步成功');
//
});
// 同步模型到数据库(创建表)
ProjectXmtzze
.
sync
({
force
:
false
,
// force: true ,//会删除已存在表并重新创建
// alter: true
})
.
then
(()
=>
{
console
.
log
(
'ProjectXmtzze 表同步成功'
);
});
// module.exports = ProjectXmtzze;
\ No newline at end of file
module
.
exports
=
ProjectXmtzze
;
\ No newline at end of file
db/model/system/message.js
0 → 100644
View file @
ff46a73d
// models/Message.js
const
{
DataTypes
}
=
require
(
'sequelize'
);
const
sequelize
=
require
(
'../index'
);
const
Message
=
sequelize
.
define
(
'Message'
,
{
// 定义字段
id
:
{
type
:
DataTypes
.
INTEGER
,
primaryKey
:
true
,
autoIncrement
:
true
},
creator
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"创建人ID"
},
receivers
:
{
type
:
DataTypes
.
JSON
,
comment
:
"接收人ID"
},
alreadyRead
:
{
type
:
DataTypes
.
JSON
,
comment
:
"已经阅读人ID"
},
title
:
{
type
:
DataTypes
.
TEXT
,
allowNull
:
false
,
comment
:
"消息标题"
},
content
:
{
type
:
DataTypes
.
TEXT
,
allowNull
:
false
,
comment
:
"消息内容"
},
/**
* 其他待存字段
*/
type
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
"消息类型 1 系统消息 2 项目初步审核 3.项目终审"
},
status
:
{
type
:
DataTypes
.
INTEGER
,
defaultValue
:
0
,
comment
:
"0 未读 1 已读"
},
del
:
{
type
:
DataTypes
.
INTEGER
,
defaultValue
:
0
,
comment
:
"0 正常 1 删除"
},
},
{
tableName
:
'system_message'
,
// 指定表名(如果与模型名不同)
timestamps
:
true
,
// 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
Message
.
sync
({
// force: false,
// force: true ,//会删除已存在表并重新创建
// alter: true
})
.
then
(()
=>
{
console
.
log
(
'Message 表同步成功'
);
});
module
.
exports
=
Message
;
\ No newline at end of file
db/model/system/user.js
View file @
ff46a73d
...
...
@@ -27,6 +27,10 @@ const User = sequelize.define('User', {
allowNull
:
true
},
avatar
:
DataTypes
.
STRING
(
500
),
//头像
type
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"用户类型 1 葛洲坝用户 2 外部项目公司用户 3 能建用户"
},
enable
:
{
type
:
DataTypes
.
INTEGER
,
defaultValue
:
0
,
...
...
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