明树Git Lab

Commit 4c0745b4 authored by zfp1's avatar zfp1

1

parent 4e0e5429
Pipeline #108283 passed with stage
in 3 seconds
......@@ -495,7 +495,7 @@ async function updateTwhgl(req, res, next) {
async function getTwhgl(req, res, next) {
try {
if (!req.body.id) return res.sendError(errorMessage.paramsError);
let info = await DB.RcTwhgl.findOne({ where: { id: req.body.id, del: 0 }, raw: true });
let info = await DB.RcTwhgl.findOne({ where: { id: req.body.id, del: 0 } });
if (!(info && info.id)) return res.sendError(errorMessage.resourceNotFound);
return res.sendData(info);
} catch (error) {
......
......@@ -26,7 +26,7 @@ const RcTwhgl = sequelize.define('RcTwhgl', {
comment: '会议时间',
defaultValue: new Date(),
get() {
const rawValue = this.getDataValue('createdAt');
const rawValue = this.getDataValue('meetingDate');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
......
......@@ -15,8 +15,18 @@ const RcTzjh = sequelize.define('RcTzjh', {
projectForeignName: { type: DataTypes.STRING, allowNull: true, comment: "项目外文名称", _mark: "lixiang" },
sbdw: { type: DataTypes.STRING, allowNull: true, comment: "申报单位" },
xmgsmc: { type: DataTypes.STRING, allowNull: true, comment: "项目公司名称/被投资企业名称" },
xmkgsjyj: { type: DataTypes.DATE, allowNull: true, comment: "项目开工时间(预计) 项目预计起始时间", _mark: "lixiang" },
xmjgsjyj: { type: DataTypes.DATE, allowNull: true, comment: "项目交工时间(预计) 项目预计完成时间", _mark: "lixiang" },
xmkgsjyj: { type: DataTypes.DATE, allowNull: true, comment: "项目开工时间(预计) 项目预计起始时间", _mark: "lixiang",
get() {
const rawValue = this.getDataValue('xmkgsjyj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
xmjgsjyj: { type: DataTypes.DATE, allowNull: true, comment: "项目交工时间(预计) 项目预计完成时间", _mark: "lixiang",
get() {
const rawValue = this.getDataValue('xmjgsjyj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
xmjd: {
type: DataTypes.STRING,
comment: "项目阶段"
......@@ -95,7 +105,11 @@ const RcTzjh = sequelize.define('RcTzjh', {
xmRzLdSjHyyjLdSj: {
type: DataTypes.DATE,
comment: '项目融资落地时间或预计落地时间'
comment: '项目融资落地时间或预计落地时间',
get() {
const rawValue = this.getDataValue('xmRzLdSjHyyjLdSj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
yjSxZbjNbsyl: {
type: DataTypes.FLOAT(5, 2),
......@@ -124,7 +138,11 @@ const RcTzjh = sequelize.define('RcTzjh', {
},
xmSjKgSj: {
type: DataTypes.DATE,
comment: '项目实际开工时间'
comment: '项目实际开工时间',
get() {
const rawValue = this.getDataValue('xmSjKgSj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
yqSxXg: {
type: DataTypes.TEXT,
......
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