明树Git Lab

Commit ccb3856e authored by zfp1's avatar zfp1

update

parent 742f9ba0
Pipeline #105417 passed with stage
in 3 seconds
This diff is collapsed.
...@@ -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,
} }
......
...@@ -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: "决策总投资 一次填报锁定"
......
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
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
...@@ -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,
......
...@@ -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
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