明树Git Lab

Commit ff46a73d authored by zfp1's avatar zfp1

update

parent 14b33e00
{
"tokenEx": 86400,
"dbURI": "mongodb://root:letian2024.@127.0.0.1:27017/letian?authSource=admin",
"tokenEx": 86400000000,
"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
This diff is collapsed.
......@@ -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' });
......
1. 项目提交(项目公司、投管) 只能靠角色
1.1 项目公司新建项目人员---项目公司项目审批人员 --- 投管项目审批人员
项目公司人员 -- 看见本公司所有项目
投管项目审批人员 -- 看见所有项目公司人员
1.2 投管新建项目 --- 投管
同步发起 一个startFlow 流程记录 发起人 发起时间 项目状态(待审批-已审批)
\ No newline at end of file
......@@ -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',
},
},
/**
* 项目基本信息
*/
......
const { DataTypes } = require('sequelize');
const sequelize = require('../index');
// 财务评价指标----废弃
// 财务评价指标
const projectCwpjzb = sequelize.define('projectCwpjzb', {
id: {
type: DataTypes.INTEGER,
......
......@@ -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,
......
......@@ -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",
......
// 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
// 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
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment