明树Git Lab

Commit 54333293 authored by zfp1's avatar zfp1

update

parent 88489a75
This diff is collapsed.
......@@ -16,10 +16,17 @@ const Project = require("./model/jt/project");
const Resources = require("./model/jt/resources");
const ResourcesInfo = require("./model/jt/resourcesInfo");
const ProjectBjtj = require("./model/jt/projectBjtj");
const ProjectCwpjzb = require("./model/jt/projectCwpjzb");
const ProjectFile = require("./model/jt/projectFile");
const ProjectFxgl = require("./model/jt/projectFxgl");
const ProjectGdxx = require("./model/jt/projectGdxx");
const ProjectJczt = require("./model/jt/projectJczt");
const ProjectJsgm = require("./model/jt/projectJsgm");
const ProjectLcbjd = require("./model/jt/projectLcbjd");
const ProjectSpyj = require("./model/jt/projectSpyj");
const ProjectTzzjll = require("./model/jt/projectTzzjll");
const ProjectTzzt = require("./model/jt/projectTzzt");
const ProjectXmtzze = require("./model/jt/projectXmtzze");
/**
......@@ -47,6 +54,13 @@ global.DB = {
ProjectGdxx,
ProjectJsgm,
ProjectSpyj,
ProjectCwpjzb,
ProjectJczt,
ProjectFxgl,
ProjectLcbjd,
ProjectTzzjll,
ProjectTzzt,
ProjectXmtzze,
}
......@@ -127,15 +141,36 @@ ResourcesInfo.belongsTo(Resources, { foreignKey: 'resourceId' });
/**项目-核心边界条件 1:n */
Project.hasMany(ProjectBjtj, { foreignKey: 'projectId', as: 'projectBjtjs' });
ProjectBjtj.belongsTo(Project, { foreignKey: 'projectId' });
/**项目-财务评价指标 1:n */
Project.hasMany(ProjectCwpjzb, { foreignKey: 'projectId', as: 'projectCwpjzbs' });
ProjectCwpjzb.belongsTo(Project, { foreignKey: 'projectId' });
/**项目-项目附件 1:n */
Project.belongsToMany(File, { through: 'jt_project_file', foreignKey: 'projectId', as: 'files', otherKey: 'fileId' });
File.belongsToMany(Project, { through: 'jt_project_file', foreignKey: 'fileId', otherKey: 'projectId', as: 'pros' });
/**项目-风险管理 1:n */
Project.hasMany(ProjectFxgl, { foreignKey: 'projectId', as: 'projectFxgls' });
ProjectFxgl.belongsTo(Project, { foreignKey: 'projectId' });
/**项目-股东信息 1:n */
Project.hasMany(ProjectGdxx, { foreignKey: 'projectId', as: 'projectGdxxs' });
ProjectGdxx.belongsTo(Project, { foreignKey: 'projectId' });
/**项目-决策主体审核情况 1:n */
Project.hasMany(ProjectJczt, { foreignKey: 'projectId', as: 'projectJczts' });
ProjectJczt.belongsTo(Project, { foreignKey: 'projectId' });
/**项目-建设规模 1:n */
Project.hasMany(ProjectJsgm, { foreignKey: 'projectId', as: 'projectJsgms' });
ProjectJsgm.belongsTo(Project, { foreignKey: 'projectId' });
/**项目-里程碑节点 1:n */
Project.hasMany(ProjectLcbjd, { foreignKey: 'projectId', as: 'projectLcbjds' });
ProjectLcbjd.belongsTo(Project, { foreignKey: 'projectId' });
/**项目-审批意见 1:n */
Project.hasMany(ProjectSpyj, { foreignKey: 'projectId', as: 'projectSpyjs' });
ProjectSpyj.belongsTo(Project, { foreignKey: 'projectId' });
\ No newline at end of file
ProjectSpyj.belongsTo(Project, { foreignKey: 'projectId' });
/**项目-项目投资资金流量 1:n */
Project.hasMany(ProjectTzzjll, { foreignKey: 'projectId', as: 'projectTzzjlls' });
ProjectTzzjll.belongsTo(Project, { foreignKey: 'projectId' });
/**项目-投资主体审核情况 1:n */
Project.hasMany(ProjectTzzt, { foreignKey: 'projectId', as: 'projectTzzts' });
ProjectTzzt.belongsTo(Project, { foreignKey: 'projectId' });
/**项目-项目投资总额 1:n */
Project.hasMany(ProjectXmtzze, { foreignKey: 'projectId', as: 'projectXmtzzes' });
ProjectXmtzze.belongsTo(Project, { foreignKey: 'projectId' });
\ No newline at end of file
......@@ -23,7 +23,7 @@ const Project = sequelize.define('Project', {
},
projectLiuZhuanType: {
type: DataTypes.STRING,
comment: "项目流转状态 草稿、待初审、初审退回、待终审、终审退回、待立项审批、立项审批退回、已立项、已暂停、已结束等",
comment: "项目流转状态 1. 草稿、3 待初审、1初审退回、5待终审、1终审退回、7待立项审批、立项审批退回、已立项、已暂停、已结束等",
},
/**
* 项目基本信息
......
......@@ -18,5 +18,7 @@ router.post('/getProjectFields', projectController.getProjectFields);
router.post('/exportExcel', projectController.exportExcel);
router.post('/getExcelTemplate', projectController.getExcelTemplate);
router.post('/preJugProject', projectController.preJugProject); //初审
router.post('/finalJugProject', projectController.finalJugProject); //终审
module.exports = router;
\ No newline at end of file
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