明树Git Lab

Commit e7e76c1d authored by zfp1's avatar zfp1

update

parent ea7ee014
Pipeline #104070 passed with stage
in 3 seconds
...@@ -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,
......
...@@ -14,18 +14,18 @@ const Project = sequelize.define('Project', { ...@@ -14,18 +14,18 @@ const Project = sequelize.define('Project', {
comment: "主键ID" comment: "主键ID"
}, },
projectCreator: { projectCreator: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
comment: "项目创建人ID", comment: "项目创建人ID",
references: { references: {
model: User, model: User,
key: 'id', key: 'id',
}, },
}, },
projectLiuZhuanType: { projectLiuZhuanType: {
type: DataTypes.STRING, type: DataTypes.STRING,
comment: "项目流转状态 1. 待提交、3 待初审、1初审退回、5待终审、1终审退回、7待立项审批、立项审批退回、已立项、已暂停、已结束等", comment: "项目流转状态 1. 待提交、3 待初审、1初审退回、5待终审、1终审退回、7待立项审批、立项审批退回、已立项、已暂停、已结束等",
}, },
projectLiuZhuanTypeDes: { projectLiuZhuanTypeDes: {
type: DataTypes.STRING, type: DataTypes.STRING,
comment: "项目流转状态说明 待提交 待初审 初审退回 待终审 终审退回 待立项审批 立项审批退回 已立项 已结束等", comment: "项目流转状态说明 待提交 待初审 初审退回 待终审 终审退回 待立项审批 立项审批退回 已立项 已结束等",
}, },
...@@ -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: "项目建设期(月)" },
...@@ -242,7 +242,7 @@ const Project = sequelize.define('Project', { ...@@ -242,7 +242,7 @@ const Project = sequelize.define('Project', {
tzztscsbsj: { type: DataTypes.DATE, allowNull: true, comment: "投资主体首次申报时间" }, tzztscsbsj: { type: DataTypes.DATE, allowNull: true, comment: "投资主体首次申报时间" },
hqwcsj: { type: DataTypes.DATE, allowNull: true, comment: "会签完成时间" }, hqwcsj: { type: DataTypes.DATE, allowNull: true, comment: "会签完成时间" },
scfhsj: { type: DataTypes.DATE, allowNull: true, comment: "首次发函时间" }, scfhsj: { type: DataTypes.DATE, allowNull: true, comment: "首次发函时间" },
bczlsj: { type: DataTypes.DATE, allowNull: true, comment: "补充资料时间" }, bczlsj: { type: DataTypes.DATE, allowNull: true, comment: "补充资料时间" },
shr: { type: DataTypes.STRING, allowNull: true, comment: "审核人" }, shr: { type: DataTypes.STRING, allowNull: true, comment: "审核人" },
jcqthysyqk: { type: DataTypes.TEXT, allowNull: true, comment: "决策-其他会议审议情况" }, jcqthysyqk: { type: DataTypes.TEXT, 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 字段(覆盖全局设置)
......
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