明树Git Lab

Commit 6bc4f9ff authored by zfp1's avatar zfp1

update

parent cb1a055a
Pipeline #108718 passed with stage
in 3 seconds
......@@ -919,12 +919,12 @@ async function createZdsxsp(req, res, next) {
return res.sendError(errorMessage.paramsError);
}
//处理文件
req.body.qylht = (req.body.qylht || []).map(o => { return o && o.id || o });
req.body.jjlht = (req.body.jjlht || []).map(o => { return o && o.id || o });
req.body.zjwj = (req.body.zjwj || []).map(o => { return o && o.id || o });
req.body.ybfspwj = (req.body.ybfspwj || []).map(o => { return o && o.id || o });
req.body.cwjr = (req.body.cwjr || []).map(o => { return o && o.id || o });
req.body.gqjg = (req.body.gqjg || []).map(o => { return o && o.id || o });
// req.body.qylht = (req.body.qylht || []).map(o => { return o && o.id || o }); //权益类合同,需要增加字段,则文件信息直接存入
// req.body.jjlht = (req.body.jjlht || []).map(o => { return o && o.id || o });
// req.body.zjwj = (req.body.zjwj || []).map(o => { return o && o.id || o });
// req.body.ybfspwj = (req.body.ybfspwj || []).map(o => { return o && o.id || o });
// req.body.cwjr = (req.body.cwjr || []).map(o => { return o && o.id || o });
// req.body.gqjg = (req.body.gqjg || []).map(o => { return o && o.id || o });
let ret = await DB.TzZdsxsp.create(req.body);
......@@ -951,16 +951,16 @@ async function getZdsxspInfo(req, res, next) {
return res.sendError(errorMessage.resourceNotFound);
}
let fileIds = [].concat(zdsxsp.qylht).concat(zdsxsp.jjlht).concat(zdsxsp.zjwj).concat(zdsxsp.ybfspwj).concat(zdsxsp.cwjr).concat(zdsxsp.gqjg);
let files = await DB.File.findAll({ where: { id: { [Op.in]: fileIds } }, raw: true });
let fileMap = {};
files.map(o => { fileMap[o.id] = o });
zdsxsp.qylht = (zdsxsp.qylht || []).map(o => { return fileMap[(o && o.id || o)] });
zdsxsp.jjlht = (zdsxsp.jjlht || []).map(o => { return fileMap[(o && o.id || o)] });
zdsxsp.zjwj = (zdsxsp.zjwj || []).map(o => { return fileMap[(o && o.id || o)] });
zdsxsp.ybfspwj = (zdsxsp.ybfspwj || []).map(o => { return fileMap[(o && o.id || o)] });
zdsxsp.cwjr = (zdsxsp.cwjr || []).map(o => { return fileMap[(o && o.id || o)] });
zdsxsp.gqjg = (zdsxsp.gqjg || []).map(o => { return fileMap[(o && o.id || o)] });
// let fileIds = [].concat(zdsxsp.qylht).concat(zdsxsp.jjlht).concat(zdsxsp.zjwj).concat(zdsxsp.ybfspwj).concat(zdsxsp.cwjr).concat(zdsxsp.gqjg);
// let files = await DB.File.findAll({ where: { id: { [Op.in]: fileIds } }, raw: true });
// let fileMap = {};
// files.map(o => { fileMap[o.id] = o });
// // zdsxsp.qylht = (zdsxsp.qylht || []).map(o => { return fileMap[(o && o.id || o)] });
// zdsxsp.jjlht = (zdsxsp.jjlht || []).map(o => { return fileMap[(o && o.id || o)] });
// zdsxsp.zjwj = (zdsxsp.zjwj || []).map(o => { return fileMap[(o && o.id || o)] });
// zdsxsp.ybfspwj = (zdsxsp.ybfspwj || []).map(o => { return fileMap[(o && o.id || o)] });
// zdsxsp.cwjr = (zdsxsp.cwjr || []).map(o => { return fileMap[(o && o.id || o)] });
// zdsxsp.gqjg = (zdsxsp.gqjg || []).map(o => { return fileMap[(o && o.id || o)] });
return res.sendData(zdsxsp);
} catch (error) {
next(error);
......
......@@ -27,11 +27,15 @@ const ThYyqtzjcTzfx = sequelize.define('ThYyqtzjcTzfx', {
type: DataTypes.DECIMAL(5, 2),
comment: "当期资本金内部收益率"
},
wfzbjnbsyl: {
type: DataTypes.DECIMAL(5, 2),
comment: "我方资本金内部收益率"
},
tzcbfxhzl: {
type: DataTypes.JSON,
comment: "投资(成本)分析会资料"
},
sourceId: {
sourceId: {
type: DataTypes.INTEGER,
comment: "所属投资控制主表id"
},
......
......@@ -32,7 +32,19 @@ const ThYyqtzjcZxjc = sequelize.define('ThYyqtzjcZxjc', {
// return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
// }
// },
jcjg: {
jcmc: {
type: DataTypes.STRING,
comment: "检查名称"
},
jcsj: {
type: DataTypes.DATE,
comment: "检查时间",
get() {
const rawValue = this.getDataValue('jcsj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
jcjg: {
type: DataTypes.TEXT,
comment: "检查结果"
},
......@@ -40,13 +52,13 @@ const ThYyqtzjcZxjc = sequelize.define('ThYyqtzjcZxjc', {
type: DataTypes.TEXT,
comment: "整改措施清单"
},
fjcl: {
type: DataTypes.JSON,
comment: "附件材料"
},
sourceId: {
sourceId: {
type: DataTypes.INTEGER,
comment: "所属投资控制主表id"
},
......
......@@ -24,6 +24,10 @@ const TzJsqtzjcTzfx = sequelize.define('TzJsqtzjcTzfx', {
type: DataTypes.DECIMAL(5, 2),
comment: "当期资本金内部收益率"
},
wfzbjnbsyl: {
type: DataTypes.DECIMAL(5, 2),
comment: "我方资本金内部收益率"
},
tzcbfxhzl: {
type: DataTypes.JSON,
comment: "投资(成本)分析会资料"
......
......@@ -25,13 +25,25 @@ const TzJsqtzjcZxjc = sequelize.define('TzJsqtzjcZxjc', {
// }
// },
// jssj: {
// type: DataTypes.DATE,
// comment: "结束时间",
// get() {
// const rawValue = this.getDataValue('jssj');
// return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
// }
// type: DataTypes.DATE,
// comment: "结束时间",
// get() {
// const rawValue = this.getDataValue('jssj');
// return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
// }
// },
jcmc: {
type: DataTypes.STRING,
comment: "检查名称"
},
jcsj: {
type: DataTypes.DATE,
comment: "检查时间",
get() {
const rawValue = this.getDataValue('jcsj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
jcjg: {
type: DataTypes.TEXT,
comment: "检查结果"
......
......@@ -38,6 +38,7 @@ const TzTzkz = sequelize.define('TzTzkz', {
comment: "其他建设目标重大偏差----文件上传",
},
qt: {type: DataTypes.JSON, comment: "其他建设目标重大偏差----其他板块,内容包括问题描述、相关影响、已采取措施、下一步计划。"},
projectId: {
type: DataTypes.INTEGER,
comment: "所属项目ID",
......
......@@ -46,6 +46,10 @@ const TzTzkzGq = sequelize.define('TzTzkzGq', {
type: DataTypes.TEXT,
comment: "合同工期约定描述"
},
xgyxfx: {
type: DataTypes.TEXT,
comment: "相关影响分析"
},
gqywsm: {
type: DataTypes.TEXT,
comment: "工期延误说明"
......
......@@ -24,9 +24,29 @@ const TzZdsxsp = sequelize.define('TzZdsxsp', {
type: DataTypes.JSON,
comment: "经济类合同"
},
zjwj: {
// zjwj: {
// type: DataTypes.JSON,
// comment: "造价文件"
// },
juecewj: {
type: DataTypes.JSON,
comment: "造价文件"
comment: "决策文件"
},
gusuanwj: {
type: DataTypes.JSON,
comment: "估算文件"
},
gaisuanwj: {
type: DataTypes.JSON,
comment: "概算文件"
},
yswj: {
type: DataTypes.JSON,
comment: "预算文件"
},
tgwj: {
type: DataTypes.JSON,
comment: "调概文件"
},
ybfspwj: {
type: DataTypes.JSON,
......@@ -36,10 +56,10 @@ const TzZdsxsp = sequelize.define('TzZdsxsp', {
type: DataTypes.JSON,
comment: "变更索赔"
},
cwjr: {
type: DataTypes.JSON,
comment: "接入财务金融部资本金出资台账,台账更新,系统上跟着更新"
},
// cwjr: {
// type: DataTypes.JSON,
// comment: "接入财务金融部资本金出资台账,台账更新,系统上跟着更新"
// },
gqjg: {
type: DataTypes.JSON,
comment: "股权结构、资金来源及构成发生重大变化的报告及审批文件"
......
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