明树Git Lab

Commit 65ea9f8c authored by zfp1's avatar zfp1

update

parent 1164a649
Pipeline #104191 passed with stage
in 3 seconds
......@@ -309,15 +309,15 @@ async function queryLixiangResult(req, res, next) {
return res.sendError(errorMessage.resourceNotFound)
}
//请求能建提供接口
let result = {success: true};
let result = { success: true };
//成功
if(result.success) {
if (result.success) {
let proInfo = await projectModule.getProjectInfoByLixiang(req.body);
//1. 更新项目状态
await DB.Project.update({projectLzType: 5}, {where: {id: req.body.id}});
await DB.Project.update({ projectLzType: 5 }, { where: { id: req.body.id } });
//2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式
proInfo.projectLzType = 5;
await DB.ProjectLixiang.create({lixiang: proInfo, projectId: proInfo.id});
await DB.ProjectLixiang.create({ lixiang: proInfo, projectId: proInfo.id });
return res.sendData(proInfo);
} else {
return res.sendError(errorMessage.resourceNotFound); //暂时
......@@ -498,11 +498,11 @@ async function queryJueceResult(req, res, next) {
return res.sendError(errorMessage.resourceNotFound)
}
//请求能建提供接口
let result = {success: true};
let result = { success: true };
//成功
if(result.success) {
if (result.success) {
//1. 更新项目状态
await DB.Project.update({projectLzType: 9}, {where: {id: req.body.id}}); //已经决策成功
await DB.Project.update({ projectLzType: 9 }, { where: { id: req.body.id } }); //已经决策成功
return res.sendData();
} else {
return res.sendError(errorMessage.resourceNotFound); //暂时
......@@ -774,13 +774,13 @@ async function getProjectInfo(req, res, next) {
let ret = await projectModule.getProjectInfo(req.body);
let lixiang = await DB.ProjectLixiang.findOne({
order: [['createdAt', 'DESC']],
where: {projectId: req.body.id},
where: { projectId: req.body.id },
});
let obj ={};
if(lixiang && lixiang.id) {
let obj = {};
if (lixiang && lixiang.id) {
obj.lixiang = lixiang.lixiang; //快照
//当项目状态 进入决策信息填报时候
if([7, 8, 9].includes(ret && ret.projectLzType)) {
if ([7, 8, 9].includes(ret && ret.projectLzType)) {
obj.juece = ret;
}
} else {
......@@ -813,22 +813,30 @@ async function listProject(req, res, next) {
let search = {};
let where = { del: 0 };
//处理筛选条件
switch (req.body.buttonType) {
case "xmdak":
let projectLzTypes = [1];
switch (req.body.menuType) {
case "xmlingxuan":
projectLzTypes = [1];
break;
case "xmlx":
projectLzTypes = [3, 5];
break;
case "xmjc":
projectLzTypes = [8, 9];
break;
case "xmlz":
projectLzTypes = [7];
break;
case "xmdak":
projectLzTypes = [5, 7, 8, 9];
break;
default:
projectLzTypes = [5, 7, 8, 9];
break;
}
if(req.body.menuType) {
where.projectLzType = {[Op.in]: projectLzTypes}
}
search.limit = limit;
search.offset = offset;
if (req.body.attributes && req.body.attributes.length) {
......
......@@ -225,7 +225,8 @@ const Project = sequelize.define('Project', {
// qtxgzccl: { type: DataTypes.STRING, allowNull: true, comment: "其他相关支撑材料" },
// shya: { type: DataTypes.STRING, allowNull: true, comment: "上会议案" },
// 财务指标 ---暂时搁置
// 投决计划 ---暂时搁置
// 项目投资总额--有增加
// 财务评价指标--有增加
......@@ -247,6 +248,45 @@ const Project = sequelize.define('Project', {
//申请报告---暂时搁置
// 财务指标 ---暂时搁置
//项目投资总额(全口径)
jaf: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "建安费" },
sbjgjgzf: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "设备及工具购置费" },
tdxgfy: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "土地相关费用" },
jsdwglf: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "建设单位管理费" },
qtjsxmglf: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "其他建设项目管理费" },
qtfy: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "其他费用" },
jsqlx: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "建设期利息" },
ybf: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "预备费" },
tzsypc: { type: DataTypes.DECIMAL(3, 2), allowNull: true, comment: "投资收益偏差" },
zrrz: { type: DataTypes.DECIMAL(3, 2), allowNull: true, comment: "责任融资" },
njfcze: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "能建方出资额" },
zbjed: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "资本金额度" },
dked: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "贷款额度" },
qzfbbxmwfdkdbe: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "其中:非并表项目我方贷款/担保额" },
njfsjcze: {type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "能建方实际出资额" },
zbjbl: { type: DataTypes.DECIMAL(3, 2), allowNull: true, comment: "资本金比例" },
njszgbpfe: {type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "能建所占股比批复额" },
ddb: { type: DataTypes.DECIMAL(3, 2), allowNull: true, comment: "带动比" },
yjddb: { type: DataTypes.DECIMAL(3, 2), allowNull: true, comment: "预计带动比" },
zcbhtesghte: {type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "总承包合同额(施工合同额)" },
//企业财务投资能力评价
qyzjzez: {type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "权益资金值(E值)" },
zcfzl: { type: DataTypes.DECIMAL(3, 2), allowNull: true, comment: "资产负债率" },
jzcsyl: { type: DataTypes.DECIMAL(3, 2), allowNull: true, comment: "净资产收益率" },
lxbzbs: { type: DataTypes.STRING, allowNull: true, comment: "利息保障倍数" },
jyhdxjllje: {type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "经营活动现金流量净额" },
jzc: {type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "净资产" },
zzc: {type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "总资产" },
yysr: {type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "营业收入" },
sbdwjzc: {type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "申报单位净资产" },
sbdwjlr: {type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "申报单位净利润" },
sbdwhbzj: {type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "申报单位货币资金" },
dxfzgm: {type: DataTypes.STRING, allowNull: true, comment: "带息负债规模"},
jlnsflxks: {type: DataTypes.INTEGER, allowNull: true, comment: "近两年是否连续亏损", _mark: 'juece', zjType: 'danxuan', zjKey: 'sf'},
// 项目可行性:项目投资现金流量表 项目资本金现金流量表 能建方现金流量表 利润表 投评报告及测算表
/**------------------------------------------------------------------------------------------------ */
......@@ -787,14 +827,9 @@ const Project = sequelize.define('Project', {
// zbsjx: { type: DataTypes.STRING, allowNull: true, comment: "指标数据项" },
// sjzb: { type: DataTypes.STRING, allowNull: true, comment: "实际指标" },
//
// jaf: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "建安费" },
// sbjgjgzf: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "设备及工具购置费" },
// tdxgfy: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "土地相关费用" },
// jsdwglf: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "建设单位管理费" },
// qtjsxmglf: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "其他建设项目管理费" },
// qtfy: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "其他费用" },
// njfjaf: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "能建方建安费" },
// jsqlx: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "建设期利息" },
// ysjh: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "营收计划" },
// lrjh: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "利润计划" },
// tzhsjh: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "投资回收计划" },
......
......@@ -12,6 +12,14 @@ const projectCwpjzb = sequelize.define('projectCwpjzb', {
type: DataTypes.STRING,
comment: "指标名称"
},
tzpgjdjzz: {
type: DataTypes.DECIMAL(20, 4),
comment: "投资评估阶段基准值"
},
tzpgjdpfz: {
type: DataTypes.DECIMAL(20, 4),
comment: "投资评估阶段批复值"
},
num: {
type: DataTypes.DECIMAL(20, 4),
comment: "数量"
......
......@@ -21,8 +21,8 @@ router.post('/queryLixiangResult', projectController.queryLixiangResult);
// -----------------------接收能建立项结果信息,更新立项批复信息等字段------------------------------------------
router.post('/saveJuece', projectController.saveJuece); //决策保存
router.post('/startJuece', projectController.startJuece);
router.post('/queryJueceResult', projectController.queryJueceResult);
router.post('/startJuece', projectController.startJuece); //发起决策
router.post('/queryJueceResult', projectController.queryJueceResult); //查询决策审批结果
router.post('/getProjectInfo', projectController.getProjectInfo);
......
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