明树Git Lab

Commit 3105652c authored by zfp1's avatar zfp1

1

parent f8cea7e0
Pipeline #108168 passed with stage
in 3 seconds
......@@ -413,8 +413,8 @@ async function getCgqygl(req, res, next) {
let info = await DB.RcCgqygl.findOne({ where: search, raw: true });
if (!(info && info.id && info.projectId)) return res.sendError(errorMessage.resourceNotFound);
let tzfhs = await DB.RcCgqyglTzfh.findAll({ where: { projectId: info.projectId, sourceId: info.id }, raw: true });
let wtyys = await DB.RcCgqyglWtyy.findAll({ where: { projectId: info.projectId, sourceId: info.id }, raw: true });
let tzfhs = await DB.RcCgqyglTzfh.findAll({ where: { projectId: info.projectId, sourceId: info.id }});
let wtyys = await DB.RcCgqyglWtyy.findAll({ where: { projectId: info.projectId, sourceId: info.id }});
info.tzfhs = tzfhs || [];
info.wtyys = wtyys || [];
return res.sendData(info);
......
......@@ -481,7 +481,7 @@ async function getYjglList(req, res, next) {
let offset = (page - 1) * limit;
let search = {};
search.order = [['createdAt', 'DESC']];
search.order = [['id', 'DESC']];
search.limit = limit;
search.offset = offset;
......
......@@ -23,7 +23,12 @@ const RcTwhgl = sequelize.define('RcTwhgl', {
meetingDate: {
type: DataTypes.DATE,
allowNull: false,
comment: '会议时间'
comment: '会议时间',
defaultValue: new Date(),
get() {
const rawValue = this.getDataValue('createdAt');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
meetingLocation: {
type: DataTypes.STRING(200),
......
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