明树Git Lab

Commit 0c867a64 authored by zfp1's avatar zfp1

1

parent ccb3856e
This diff is collapsed.
......@@ -64,6 +64,15 @@ const TzZdsxspfl = require("./model/jt/tzZdsxspfl");
const TzXmtc = require("./model/jt/tzXmtc");
const TzXmtcCwzb = require("./model/jt/tzXmtcCwzb");
const ThTzhpj = require('./model/jt/thTzhpj');
const ThTzhpjwtzg = require('./model/jt/thTzhpjwtzg');
const ThYyqtzhs = require('./model/jt/thYyqtzhs');
const ThYyqtzhszb = require('./model/jt/thYyqtzhszb');
const ThYyqtzjc = require('./model/jt/thYyqtzjc');
const ThYyqtzjcTzfx = require('./model/jt/thYyqtzjcTzfx');
const ThYyqtzjcZxjc = require('./model/jt/thYyqtzjcZxjc');
const ThYyqtzjcrcjc = require('./model/jt/thYyqtzjcrcjc');
/**
* 业务表
*/
......@@ -124,6 +133,15 @@ global.DB = {
TzZdsxspfl,
TzXmtc,
TzXmtcCwzb,
ThTzhpj,
ThTzhpjwtzg,
ThYyqtzhs,
ThYyqtzhszb,
ThYyqtzjc,
ThYyqtzjcTzfx,
ThYyqtzjcZxjc,
ThYyqtzjcrcjc,
}
......
const { DataTypes } = require('sequelize');
const sequelize = require('../index');
const moment = require('moment');
//投中管理- 建设期投资检查
const ThTzhpj = sequelize.define('ThTzhpj', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
projectName: {
type: DataTypes.STRING,
comment: "项目名称",
},
xmgszcbg: {
type: DataTypes.JSON,
comment: "项目公司自查报告",
},
hpjbg: {
type: DataTypes.JSON,
comment: "后评价报告",
},
qsmzqpj: {
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_th_tzhpj', // 指定表名(如果与模型名不同)
timestamps: true, // 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
ThTzhpj.sync({
force: false,
// force: true ,//会删除已存在表并重新创建
// alter: true
})
.then(() => {
console.log('ThTzhpj 表同步成功');
});
module.exports = ThTzhpj;
\ No newline at end of file
const { DataTypes } = require('sequelize');
const sequelize = require('../index');
const moment = require('moment');
//投中管理- 建设期投资检查
const ThTzhpjwtzg = sequelize.define('ThTzhpjwtzg', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
ccwt: {
type: DataTypes.TEXT,
comment: "存在的问题",
},
wtxs: {
type: DataTypes.TEXT,
comment: "问题详述",
},
zgcs: {
type: DataTypes.TEXT,
comment: "整改措施",
},
lsqk: {
type: DataTypes.TEXT,
comment: "落实情况",
},
zrbm: {
type: DataTypes.STRING,
comment: "责任部门",
},
zrr: {
type: DataTypes.STRING,
comment: "责任人",
},
zgqx: {
type: DataTypes.DATE,
comment: "整改期限",
},
sfgb: {
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_th_tzhpjwtzg', // 指定表名(如果与模型名不同)
timestamps: true, // 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
ThTzhpjwtzg.sync({
force: false,
// force: true ,//会删除已存在表并重新创建
// alter: true
})
.then(() => {
console.log('ThTzhpjwtzg 表同步成功');
});
module.exports = ThTzhpjwtzg;
\ No newline at end of file
const { DataTypes } = require('sequelize');
const sequelize = require('../index');
const moment = require('moment');
//投中管理- 建设期投资检查
const ThYjgl = sequelize.define('ThYjgl', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
projectName: {
type: DataTypes.STRING,
comment: "项目名称",
},
zbyzyj: {
type: DataTypes.JSON,
comment: "资本运作移交",
},
qzlyzzyj: {
type: DataTypes.JSON,
comment: "期中履约终止移交",
},
qmyj: {
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_th_yjgl', // 指定表名(如果与模型名不同)
timestamps: true, // 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
ThYjgl.sync({
force: false,
// force: true ,//会删除已存在表并重新创建
// alter: true
})
.then(() => {
console.log('ThYjgl 表同步成功');
});
module.exports = ThYjgl;
\ No newline at end of file
const { DataTypes } = require('sequelize');
const sequelize = require('../index');
const moment = require('moment');
/**
* 投中管理- 建设期投资回收
*/
const ThYyqtzhs = sequelize.define('ThYyqtzhs', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
projectName: {
type: DataTypes.STRING,
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_th_yyqtzhs', // 指定表名(如果与模型名不同)
timestamps: true, // 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
ThYyqtzhs.sync({
// force: false,
// force: true ,//会删除已存在表并重新创建
alter: true
})
.then(() => {
console.log('ThYyqtzhs 表同步成功');
});
module.exports = ThYyqtzhs;
\ No newline at end of file
const { DataTypes } = require('sequelize');
const sequelize = require('../index');
const moment = require('moment');
/**
* 投中管理- 建设期投资回收关联表
*/
const ThYyqtzhszb = sequelize.define('ThYyqtzhszb', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
year: {
type: DataTypes.DATE,
comment: "年份",
},
month: {
type: DataTypes.INTEGER,
comment: "月份",
},
xh: {
type: DataTypes.STRING,
comment: "序号",
},
ndtzhsmb: {
type: DataTypes.DECIMAL(20, 2),
comment: "年度投资回收目标"
},
dyhs: {
type: DataTypes.DECIMAL(20, 2),
comment: "当月回收"
},
dyljhs: {
type: DataTypes.DECIMAL(20, 2),
comment: "当月累计回收"
},
ndjhwcl: {
type: DataTypes.DECIMAL(5, 2),
comment: "年度计划完成率 %"
},
bz: {
type: DataTypes.TEXT,
comment: "备注",
},
groupBy: {
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_th_yyqtzhszb', // 指定表名(如果与模型名不同)
timestamps: true, // 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
ThYyqtzhszb.sync({
// force: false,
// force: true ,//会删除已存在表并重新创建
alter: true
})
.then(() => {
console.log('ThYyqtzhszb 表同步成功');
});
module.exports = ThYyqtzhszb;
\ No newline at end of file
const { DataTypes } = require('sequelize');
const sequelize = require('../index');
const moment = require('moment');
//投中管理- 建设期投资检查
const ThYyqtzjc = sequelize.define('ThYyqtzjc', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
projectName: {
type: DataTypes.STRING,
comment: "项目名称",
},
jcztz: {
type: DataTypes.DECIMAL(20, 2),
comment: "决策总投资 一次填报锁定"
},
zbjnbsyl: {
type: DataTypes.DECIMAL(5, 2),
comment: "资本金内部收益率(%) 一次填报锁定"
},
ycztz: {
type: DataTypes.DECIMAL(20, 2),
comment: "预测总投资"
},
qrztz: {
type: DataTypes.DECIMAL(20, 2),
comment: "确认总投资"
},
// zbjnbsyl: { // 重复了 应该是文档有错误
// type: DataTypes.DECIMAL(5, 2),
// 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_th_yyqtzjc', // 指定表名(如果与模型名不同)
timestamps: true, // 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
ThYyqtzjc.sync({
force: false,
// force: true ,//会删除已存在表并重新创建
// alter: true
})
.then(() => {
console.log('ThYyqtzjc 表同步成功');
});
module.exports = ThYyqtzjc;
\ No newline at end of file
const { DataTypes } = require('sequelize');
const sequelize = require('../index');
const moment = require('moment');
//投中管理- 建设期投资检查 ---投资(成本)分析会资料
const ThYyqtzjcTzfx = sequelize.define('ThYyqtzjcTzfx', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
jd: {
type: DataTypes.STRING,
comment: "季度",
},
ycztz: {
type: DataTypes.DECIMAL(20, 2),
comment: "当期预测总投资"
},
zbjnbsyl: {
type: DataTypes.DECIMAL(5, 2),
comment: "当期资本金内部收益率"
},
tzcbfxhzl: {
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_th_yyqtzjcTzfx', // 指定表名(如果与模型名不同)
timestamps: true, // 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
ThYyqtzjcTzfx.sync({
force: false,
// force: true ,//会删除已存在表并重新创建
// alter: true
})
.then(() => {
console.log('ThYyqtzjcTzfx 表同步成功');
});
module.exports = ThYyqtzjcTzfx;
\ No newline at end of file
const { DataTypes } = require('sequelize');
const sequelize = require('../index');
const moment = require('moment');
//投中管理- 建设期投资检查 ---日常检查 对投资目标偏差每半年进行一次系统盘点,上传分析材料
const ThYyqtzjcZxjc = sequelize.define('ThYyqtzjcZxjc', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
zxjcfl: {
type: DataTypes.INTEGER,
comment: "专项检查分类 1 能建投资检查、2 葛洲坝集团投资检查、3 公司投资检查、4 其他投资检查"
},
kssj: {
type: DataTypes.DATE,
comment: "开始时间",
get() {
const rawValue = this.getDataValue('kssj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
jssj: {
type: DataTypes.DATE,
comment: "结束时间",
get() {
const rawValue = this.getDataValue('jssj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
fjcl: {
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_th_yyqtzjcZxjc', // 指定表名(如果与模型名不同)
timestamps: true, // 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
ThYyqtzjcZxjc.sync({
// force: false,
// force: true ,//会删除已存在表并重新创建
alter: true
})
.then(() => {
console.log('ThYyqtzjcZxjc 表同步成功');
});
module.exports = ThYyqtzjcZxjc;
\ No newline at end of file
const { DataTypes } = require('sequelize');
const sequelize = require('../index');
const moment = require('moment');
//投中管理- 建设期投资检查 ---日常检查 对投资目标偏差每半年进行一次系统盘点,上传分析材料
const ThYyqtzjcrcjc = sequelize.define('ThYyqtzjcrcjc', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
kssj: {
type: DataTypes.DATE,
comment: "开始时间",
get() {
const rawValue = this.getDataValue('kssj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
jssj: {
type: DataTypes.DATE,
comment: "结束时间",
get() {
const rawValue = this.getDataValue('jssj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
pdnrsm: {
type: DataTypes.TEXT,
comment: "盘点内容说明"
},
fxcl: {
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_th_yyqtzjcrcjc', // 指定表名(如果与模型名不同)
timestamps: true, // 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
ThYyqtzjcrcjc.sync({
// force: false,
// force: true ,//会删除已存在表并重新创建
alter: true
})
.then(() => {
console.log('ThYyqtzjcrcjc 表同步成功');
});
module.exports = ThYyqtzjcrcjc;
\ No newline at end of file
......@@ -67,9 +67,9 @@ const TzJsqtzjc = sequelize.define('TzJsqtzjc', {
// 同步模型到数据库(创建表)
TzJsqtzjc.sync({
force: false,
// force: false,
// force: true ,//会删除已存在表并重新创建
// alter: true
alter: true
})
.then(() => {
console.log('TzJsqtzjc 表同步成功');
......
......@@ -5,6 +5,7 @@ const router = express.Router();
const projectController = require('../controller/projectController');
const projectTzController = require('../controller/projectTzController');
const projectThController = require('../controller/projectThController');
/**
* 项目相关
......@@ -92,4 +93,30 @@ router.post('/getXmtcList', projectTzController.getXmtcList);
router.post('/getXmtcInfo', projectTzController.getXmtcInfo);
/**
* 投后
*/
//运营期投资回收
router.post('/createYyqtzhs', projectThController.createYyqtzhs);
router.post('/updateYyqtzhs', projectThController.updateYyqtzhs);
router.post('/getYyqtzhsList', projectThController.getYyqtzhsList);
router.post('/getYyqtzhsInfo', projectThController.getYyqtzhsInfo);
// 运营期投资检查
router.post('/createYyqtzjc', projectThController.createYyqtzjc);
router.post('/updateYyqtzjc', projectThController.updateYyqtzjc);
router.post('/getYyqtzjcList', projectThController.getYyqtzjcList);
router.post('/getYyqtzjcInfo', projectThController.getYyqtzjcInfo);
//投资后评价
router.post('/createTzhpj', projectThController.createTzhpj);
router.post('/updateTzhpj', projectThController.updateTzhpj);
router.post('/getTzhpjList', projectThController.getTzhpjList);
router.post('/getTzhpjInfo', projectThController.getTzhpjInfo);
//移交管理
router.post('/createYjgl', projectThController.createYjgl);
router.post('/updateYjgl', projectThController.updateYjgl);
router.post('/getYjglList', projectThController.getYjglList);
router.post('/getYjglInfo', projectThController.getYjglInfo);
module.exports = router;
\ No newline at end of file
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