明树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) {
let rawAttributes = DB.Project.rawAttributes;
let obj = {
xmjbxx: '项目基本信息',
jcpfxx: '决策及批复信息',
xmgslspfxx: '项目公司落实批复信息',
xmfhhgxffj: '项目合法合规性附件',
qshmkchw: '全生命周期策划文件',
xmjxxpj: '项目绩效评价',
mbzrskh: '目标责任书考核',
hpj: '后评价',
zdsxsb: '重大事项上报',
tzfx: '投资分析',
tzjc: '投资检查',
tzhs: '投资核算',
system: '系统字段',
glfsj: '管理费上缴',
pppzgfa: 'PPP资格认定方案',
xmjs: '项目结束/暂停(备案资料)',
// jcpfxx: '决策及批复信息',
// xmgslspfxx: '项目公司落实批复信息',
// xmfhhgxffj: '项目合法合规性附件',
// qshmkchw: '全生命周期策划文件',
// xmjxxpj: '项目绩效评价',
// mbzrskh: '目标责任书考核',
// hpj: '后评价',
// zdsxsb: '重大事项上报',
// tzfx: '投资分析',
// tzjc: '投资检查',
// tzhs: '投资核算',
// system: '系统字段',
// glfsj: '管理费上缴',
// pppzgfa: 'PPP资格认定方案',
// xmjs: '项目结束/暂停(备案资料)',
};
for (const key in rawAttributes) {
let element = _.pick(rawAttributes[key], ['comment', '_mark', 'fieldName']);
......@@ -33,7 +33,7 @@ async function getProjectFields(req, res, next) {
}
let attributes = _.groupBy(rawAttributes, '_mark');
let ret = [];
for (const key in attributes) {
for (const key in obj) {
let element = attributes[key];
ret.push({
key: key,
......
......@@ -100,37 +100,37 @@ const Project = sequelize.define('Project', {
/*------------------------------------------------------- */
//项目基本信息
projectName: { type: DataTypes.STRING, allowNull: true, comment: "项目名称" },
projectCode: { type: DataTypes.STRING, allowNull: true, comment: "项目编号" },
cym: { type: DataTypes.STRING, allowNull: true, comment: "曾用名" },
sfzjc: { type: DataTypes.INTEGER, allowNull: true, comment: "是否再决策", zjType: 'xiala', zjKey: 'sf' }, // 1是 2 否
projectForeignName: { type: DataTypes.STRING, allowNull: true, comment: "项目外文名称" },
sfnjlhtxm: { type: DataTypes.INTEGER, allowNull: true, comment: "是否能建联合体项目" , zjType: 'xiala', zjKey: 'sf'}, // 1是 2 否
applicationUnit: { type: DataTypes.STRING, allowNull: true, comment: "申报单位" },
zyfzy: { type: DataTypes.STRING, allowNull: true, comment: "主业/非主业" , zjType: 'xiala'}, //TODO:下拉
zsqy: { type: DataTypes.STRING, allowNull: true, comment: "直属企业" },
sfnjzdhzytz: { type: DataTypes.INTEGER, allowNull: true, comment: "是否能建重大或重要投资" , zjType: 'xiala', zjKey: 'sf'},
sfzzjc: { type: DataTypes.INTEGER, allowNull: true, comment: "是否自主决策" },
cwbblx: { type: DataTypes.STRING, allowNull: true, comment: "财务报表类型" , zjType: 'xiala'}, //TODO:下拉
zfsphzbajb: { type: DataTypes.STRING, allowNull: true, comment: "政府审批(核准、备案)级别" , zjType: 'xiala'}, //TODO:下拉
sflxbqyscx: { type: DataTypes.INTEGER, allowNull: true, comment: "是否履行标前预审程序" , zjType: 'xiala', zjKey: 'sf'},
xmztz: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "项目总投资" },
glzt: { type: DataTypes.STRING, allowNull: true, comment: "管理主体" },
tzms: { type: DataTypes.STRING, allowNull: true, comment: "投资模式" },
dwqypp: { type: DataTypes.STRING, allowNull: true, comment: "对外签约品牌" },
xmzjly: { type: DataTypes.STRING, allowNull: true, comment: "项目资金来源" },
swbxmlx: { type: DataTypes.STRING, allowNull: true, comment: "商务部项目类型" , zjType: 'xiala'}, //TODO:下拉
xmlx: { type: DataTypes.STRING, allowNull: true, comment: "项目类型" , zjType: 'xiala'}, //TODO:下拉
sfpppxm: { type: DataTypes.INTEGER, allowNull: true, comment: "是否PPP项目", zjType: 'xiala', zjKey: 'sf' },
projectName: { type: DataTypes.STRING, allowNull: true, comment: "项目名称", _mark: "xmjbxx" },
projectCode: { type: DataTypes.STRING, allowNull: true, comment: "项目编号", _mark: "xmjbxx" },
cym: { type: DataTypes.STRING, allowNull: true, comment: "曾用名", _mark: "xmjbxx" },
sfzjc: { type: DataTypes.INTEGER, allowNull: true, comment: "是否再决策", zjType: 'xiala', zjKey: 'sf', _mark: "xmjbxx" }, // 1是 2 否
projectForeignName: { type: DataTypes.STRING, allowNull: true, comment: "项目外文名称", _mark: "xmjbxx" },
sfnjlhtxm: { type: DataTypes.INTEGER, allowNull: true, comment: "是否能建联合体项目", zjType: 'xiala', zjKey: 'sf', _mark: "xmjbxx" }, // 1是 2 否
applicationUnit: { type: DataTypes.STRING, allowNull: true, comment: "申报单位", _mark: "xmjbxx" },
zyfzy: { type: DataTypes.STRING, allowNull: true, comment: "主业/非主业", zjType: 'xiala', _mark: "xmjbxx" }, //TODO:下拉
zsqy: { type: DataTypes.STRING, allowNull: true, comment: "直属企业", _mark: "xmjbxx" },
sfnjzdhzytz: { type: DataTypes.INTEGER, allowNull: true, comment: "是否能建重大或重要投资", zjType: 'xiala', zjKey: 'sf', _mark: "xmjbxx" },
sfzzjc: { type: DataTypes.INTEGER, allowNull: true, comment: "是否自主决策", _mark: "xmjbxx" },
cwbblx: { type: DataTypes.STRING, allowNull: true, comment: "财务报表类型", zjType: 'xiala', _mark: "xmjbxx" }, //TODO:下拉
zfsphzbajb: { type: DataTypes.STRING, allowNull: true, comment: "政府审批(核准、备案)级别", zjType: 'xiala', _mark: "xmjbxx" }, //TODO:下拉
sflxbqyscx: { type: DataTypes.INTEGER, allowNull: true, comment: "是否履行标前预审程序", zjType: 'xiala', zjKey: 'sf', _mark: "xmjbxx" },
xmztz: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "项目总投资", _mark: "xmjbxx" },
glzt: { type: DataTypes.STRING, allowNull: true, comment: "管理主体", _mark: "xmjbxx" },
tzms: { type: DataTypes.STRING, allowNull: true, comment: "投资模式", _mark: "xmjbxx" },
dwqypp: { type: DataTypes.STRING, allowNull: true, comment: "对外签约品牌", _mark: "xmjbxx" },
xmzjly: { type: DataTypes.STRING, allowNull: true, comment: "项目资金来源", _mark: "xmjbxx" },
swbxmlx: { type: DataTypes.STRING, allowNull: true, comment: "商务部项目类型", zjType: 'xiala', _mark: "xmjbxx" }, //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', _mark: "xmjbxx" },
//项目所在地
jnw: { 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:下拉
qxjngjjw: { 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'},
jnw: { 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:下拉
qxjngjjw: { 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' },
//计量币种
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: "汇率" },
//实施时间
xmjsqy: { type: DataTypes.STRING, allowNull: true, comment: "项目建设期(月)" },
......@@ -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', // 指定表名(如果与模型名不同)
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