明树Git Lab

Commit 348901f2 authored by zfp1's avatar zfp1

update

parent ac597227
Pipeline #108127 passed with stage
in 3 seconds
...@@ -68,7 +68,7 @@ async function createProject(req, res, next) { ...@@ -68,7 +68,7 @@ async function createProject(req, res, next) {
'lxzl', 'lxpfwj', 'xgshcl']); 'lxzl', 'lxpfwj', 'xgshcl']);
projectInfo.projectCreator = req.user.id; projectInfo.projectCreator = req.user.id;
projectInfo.projectLzType = 1; // 草稿状态 projectInfo.projectLzType = "1"; // 草稿状态
let project = await DB.Project.create(projectInfo); let project = await DB.Project.create(projectInfo);
project = project.toJSON(); project = project.toJSON();
...@@ -156,7 +156,7 @@ async function createProject(req, res, next) { ...@@ -156,7 +156,7 @@ async function createProject(req, res, next) {
// // title: `项目【${project.name}】已发起,请尽快处理!`, // // title: `项目【${project.name}】已发起,请尽快处理!`,
// // content: `项目【${project.name}】已发起,请尽快处理!` // // content: `项目【${project.name}】已发起,请尽快处理!`
// // }); // // });
// await DB.Project.update({ projectLzType: 3 }, { where: { id: project.id } }); // await DB.Project.update({ projectLzType: "3" }, { where: { id: project.id } });
// } // }
return res.sendData(project); return res.sendData(project);
} catch (error) { } catch (error) {
...@@ -330,9 +330,9 @@ async function queryLixiangResult(req, res, next) { ...@@ -330,9 +330,9 @@ async function queryLixiangResult(req, res, next) {
if (result.success) { if (result.success) {
let proInfo = await projectModule.getProjectInfoByLixiang(req.body); let proInfo = await projectModule.getProjectInfoByLixiang(req.body);
//1. 更新项目状态 //1. 更新项目状态
await DB.Project.update({ projectLzType: 5 }, { where: { id: req.body.id } }); await DB.Project.update({ projectLzType: "5" }, { where: { id: req.body.id } });
//2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式 //2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式
proInfo.projectLzType = 5; proInfo.projectLzType = "5";
// await DB.ProjectLixiang.create({ lixiang: proInfo, type: 1, projectId: proInfo.id }); // await DB.ProjectLixiang.create({ lixiang: proInfo, type: 1, projectId: proInfo.id });
return res.sendData(proInfo); return res.sendData(proInfo);
} else { } else {
...@@ -354,9 +354,9 @@ async function approvalLixiang(req, res, next) { ...@@ -354,9 +354,9 @@ async function approvalLixiang(req, res, next) {
let proInfo = await projectModule.getProjectInfoByLixiang(req.body); let proInfo = await projectModule.getProjectInfoByLixiang(req.body);
if (req.body.approvalResult) { if (req.body.approvalResult) {
//1. 更新项目状态--已立项 //1. 更新项目状态--已立项
await DB.Project.update({ projectLzType: 5 }, { where: { id: req.body.id } }); await DB.Project.update({ projectLzType: "5" }, { where: { id: req.body.id } });
//2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式 //2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式
proInfo.projectLzType = 5; proInfo.projectLzType = "5";
await DB.ProjectLixiang.create({ lixiang: proInfo, type: 1, projectId: proInfo.id }); await DB.ProjectLixiang.create({ lixiang: proInfo, type: 1, projectId: proInfo.id });
await DB.FlowRecord.create({ await DB.FlowRecord.create({
userId: req.user.id, userId: req.user.id,
...@@ -366,7 +366,7 @@ async function approvalLixiang(req, res, next) { ...@@ -366,7 +366,7 @@ async function approvalLixiang(req, res, next) {
}); });
} else { } else {
//待立项 //待立项
await DB.Project.update({ projectLzType: 1 }, { where: { id: req.body.id } }); await DB.Project.update({ projectLzType: "1" }, { where: { id: req.body.id } });
await DB.FlowRecord.create({ await DB.FlowRecord.create({
userId: req.user.id, userId: req.user.id,
actionName: '立项审批未通过', actionName: '立项审批未通过',
...@@ -586,7 +586,7 @@ async function queryJueceResult(req, res, next) { ...@@ -586,7 +586,7 @@ async function queryJueceResult(req, res, next) {
//成功 //成功
if (result.success) { if (result.success) {
//1. 更新项目状态 //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(); return res.sendData();
} else { } else {
return res.sendError(errorMessage.resourceNotFound); //暂时 return res.sendError(errorMessage.resourceNotFound); //暂时
...@@ -605,9 +605,9 @@ async function approvalJuece(req, res, next) { ...@@ -605,9 +605,9 @@ async function approvalJuece(req, res, next) {
let proInfo = await projectModule.getProjectInfo(req.body); let proInfo = await projectModule.getProjectInfo(req.body);
if (req.body.approvalResult) { if (req.body.approvalResult) {
//1. 更新项目状态--已决策 //1. 更新项目状态--已决策
await DB.Project.update({ projectLzType: 9 }, { where: { id: req.body.id } }); await DB.Project.update({ projectLzType: "9" }, { where: { id: req.body.id } });
//2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式 //2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式
proInfo.projectLzType = 9; proInfo.projectLzType = "9";
await DB.ProjectLixiang.create({ juece: proInfo, type: 2, projectId: proInfo.id }); await DB.ProjectLixiang.create({ juece: proInfo, type: 2, projectId: proInfo.id });
await DB.FlowRecord.create({ await DB.FlowRecord.create({
userId: req.user.id, userId: req.user.id,
...@@ -617,7 +617,7 @@ async function approvalJuece(req, res, next) { ...@@ -617,7 +617,7 @@ async function approvalJuece(req, res, next) {
}); });
} else { } else {
//回到 已立项 //回到 已立项
await DB.Project.update({ projectLzType: 5 }, { where: { id: req.body.id } }); await DB.Project.update({ projectLzType: "5" }, { where: { id: req.body.id } });
await DB.FlowRecord.create({ await DB.FlowRecord.create({
userId: req.user.id, userId: req.user.id,
actionName: '决策审批未通过', actionName: '决策审批未通过',
...@@ -1224,9 +1224,9 @@ async function approvalZaiJuece(req, res, next) { ...@@ -1224,9 +1224,9 @@ async function approvalZaiJuece(req, res, next) {
let proInfo = await projectModule.getProjectInfo(req.body); let proInfo = await projectModule.getProjectInfo(req.body);
if (req.body.approvalResult) { if (req.body.approvalResult) {
//1. 更新项目状态--已决策 //1. 更新项目状态--已决策
await DB.Project.update({ projectLzType: 13 }, { where: { id: req.body.id } }); await DB.Project.update({ projectLzType: "13" }, { where: { id: req.body.id } });
//2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式 //2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式
proInfo.projectLzType = 13; proInfo.projectLzType = "13";
await DB.ProjectLixiang.create({ zaijuece: proInfo, type: 3, projectId: proInfo.id }); await DB.ProjectLixiang.create({ zaijuece: proInfo, type: 3, projectId: proInfo.id });
await DB.FlowRecord.create({ await DB.FlowRecord.create({
userId: req.user.id, userId: req.user.id,
......
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