明树Git Lab

Commit 18cfbeab authored by zfp1's avatar zfp1

update

parent 4f1a372b
Pipeline #106092 passed with stage
in 3 seconds
...@@ -15,6 +15,8 @@ async function createYyqtzhs(req, res, next) { ...@@ -15,6 +15,8 @@ async function createYyqtzhs(req, res, next) {
if (!req.body.projectId) { if (!req.body.projectId) {
return res.sendError(errorMessage.paramsError); return res.sendError(errorMessage.paramsError);
} }
let ret = await DB.ThTzYyqtzhs.create(req.body);
//处理财务指标 //处理财务指标
let flattenArr = []; let flattenArr = [];
let yyqtzhss = req.body.yyqtzhss || [[]]; //二维数组 多次上报 let yyqtzhss = req.body.yyqtzhss || [[]]; //二维数组 多次上报
...@@ -25,13 +27,13 @@ async function createYyqtzhs(req, res, next) { ...@@ -25,13 +27,13 @@ async function createYyqtzhs(req, res, next) {
let ei = element[i]; let ei = element[i];
ei.groupBy = index; ei.groupBy = index;
ei.projectId = req.body.projectId; ei.projectId = req.body.projectId;
ei.sourceId = ret.id;
flattenArr.push(ei); flattenArr.push(ei);
} }
} }
delete req.body.yyqtzhss; delete req.body.yyqtzhss;
await DB.ThTzYyqtzhszb.bulkCreate(flattenArr); await DB.ThTzYyqtzhszb.bulkCreate(flattenArr);
let ret = await DB.ThTzYyqtzhs.create(req.body);
return res.sendData(ret); return res.sendData(ret);
} catch (error) { } catch (error) {
next(error); next(error);
...@@ -44,9 +46,6 @@ async function getYyqtzhsInfo(req, res, next) { ...@@ -44,9 +46,6 @@ async function getYyqtzhsInfo(req, res, next) {
if (req.body.id) { if (req.body.id) {
search.id = req.body.id; search.id = req.body.id;
} }
if (req.body.projectId) {
search.projectId = req.body.projectId;
}
if (_.isEmpty(search)) { if (_.isEmpty(search)) {
return res.sendError(errorMessage.paramsError); return res.sendError(errorMessage.paramsError);
} }
...@@ -54,7 +53,7 @@ async function getYyqtzhsInfo(req, res, next) { ...@@ -54,7 +53,7 @@ async function getYyqtzhsInfo(req, res, next) {
if (!(tzhs && tzhs.id && tzhs.projectId)) { if (!(tzhs && tzhs.id && tzhs.projectId)) {
return res.sendError(errorMessage.resourceNotFound); return res.sendError(errorMessage.resourceNotFound);
} }
let yyqtzhss = await DB.ThTzYyqtzhszb.findAll({ where: { projectId: tzhs.projectId }, raw: true }); let yyqtzhss = await DB.ThTzYyqtzhszb.findAll({ where: { projectId: tzhs.projectId, sourceId: req.body.id }, raw: true });
tzhs.yyqtzhss = _.values(_.groupBy(yyqtzhss, 'groupBy')) || [[]] tzhs.yyqtzhss = _.values(_.groupBy(yyqtzhss, 'groupBy')) || [[]]
return res.sendData(tzhs); return res.sendData(tzhs);
} catch (error) { } catch (error) {
...@@ -74,6 +73,7 @@ async function updateYyqtzhs(req, res, next) { ...@@ -74,6 +73,7 @@ async function updateYyqtzhs(req, res, next) {
let ei = element[i]; let ei = element[i];
ei.groupBy = index; ei.groupBy = index;
ei.projectId = req.body.projectId; ei.projectId = req.body.projectId;
ei.sourceId = req.body.id;
if (!ei.id) { if (!ei.id) {
if (!_.isEmpty(ei)) { if (!_.isEmpty(ei)) {
newtyyqtzhss.push(ei); newtyyqtzhss.push(ei);
...@@ -83,7 +83,7 @@ async function updateYyqtzhs(req, res, next) { ...@@ -83,7 +83,7 @@ async function updateYyqtzhs(req, res, next) {
} }
} }
} }
await DB.ThTzYyqtzhszb.destroy({ where: { projectId: req.body.projectId, id: { [Op.notIn]: ids3 } } }); // 删除id不在传入id数组里面的(用户在界面删除的) await DB.ThTzYyqtzhszb.destroy({ where: { projectId: req.body.projectId, sourceId: req.body.id, id: { [Op.notIn]: ids3 } } }); // 删除id不在传入id数组里面的(用户在界面删除的)
await DB.ThTzYyqtzhszb.bulkCreate(newtyyqtzhss);//创建新的 没有id的 await DB.ThTzYyqtzhszb.bulkCreate(newtyyqtzhss);//创建新的 没有id的
await Promise.all(infos3.map(item => { DB.ThTzYyqtzhszb.update(item, { where: { id: item.id } }) })); await Promise.all(infos3.map(item => { DB.ThTzYyqtzhszb.update(item, { where: { id: item.id } }) }));
delete req.body.yyqtzhss; delete req.body.yyqtzhss;
...@@ -134,32 +134,36 @@ async function createYyqtzjc(req, res, next) { ...@@ -134,32 +134,36 @@ async function createYyqtzjc(req, res, next) {
if (!req.body.projectId) { if (!req.body.projectId) {
return res.sendError(errorMessage.paramsError); return res.sendError(errorMessage.paramsError);
} }
let ret = await DB.ThTzYyqtzjc.create(req.body);
//日常自查 投资(成本)分析会 //日常自查 投资(成本)分析会
let yyqtzjcTzfxs = req.body.yyqtzjcTzfxs || []; let yyqtzjcTzfxs = req.body.yyqtzjcTzfxs || [];
let newyyqtzjcTzfxs = []; let newyyqtzjcTzfxs = [];
for (let index = 0; index < yyqtzjcTzfxs.length; index++) { for (let index = 0; index < yyqtzjcTzfxs.length; index++) {
let element = yyqtzjcTzfxs[index]; let element = yyqtzjcTzfxs[index];
element.projectId = req.body.projectId; element.projectId = req.body.projectId;
element.sourceId = ret.id;
element.tzcbfxhzl = (element.tzcbfxhzl || []).map(o => { return o && o.id || o }); element.tzcbfxhzl = (element.tzcbfxhzl || []).map(o => { return o && o.id || o });
newyyqtzjcTzfxs.push(element); newyyqtzjcTzfxs.push(element);
} }
delete req.body.yyqtzjcTzfxs; delete req.body.yyqtzjcTzfxs;
//日常检查 // //日常检查
let yyqtzjcrcjcs = req.body.yyqtzjcrcjcs || []; // let yyqtzjcrcjcs = req.body.yyqtzjcrcjcs || [];
let newyyqtzjcrcjcs = []; // let newyyqtzjcrcjcs = [];
for (let index = 0; index < yyqtzjcrcjcs.length; index++) { // for (let index = 0; index < yyqtzjcrcjcs.length; index++) {
let element = yyqtzjcrcjcs[index]; // let element = yyqtzjcrcjcs[index];
element.projectId = req.body.projectId; // element.projectId = req.body.projectId;
element.fxcl = (element.fxcl || []).map(o => { return o && o.id || o }); // element.fxcl = (element.fxcl || []).map(o => { return o && o.id || o });
newyyqtzjcrcjcs.push(element); // newyyqtzjcrcjcs.push(element);
} // }
delete req.body.yyqtzjcrcjcs; // delete req.body.yyqtzjcrcjcs;
//专项检查 //专项检查
let yyqtzjcZxjcs = req.body.yyqtzjcZxjcs || []; let yyqtzjcZxjcs = req.body.yyqtzjcZxjcs || [];
let newyyqtzjcZxjcs = []; let newyyqtzjcZxjcs = [];
for (let index = 0; index < yyqtzjcZxjcs.length; index++) { for (let index = 0; index < yyqtzjcZxjcs.length; index++) {
let element = yyqtzjcZxjcs[index]; let element = yyqtzjcZxjcs[index];
element.projectId = req.body.projectId; element.projectId = req.body.projectId;
element.sourceId = ret.id;
element.fjcl = (element.fjcl || []).map(o => { return o && o.id || o }); element.fjcl = (element.fjcl || []).map(o => { return o && o.id || o });
newyyqtzjcZxjcs.push(element); newyyqtzjcZxjcs.push(element);
} }
...@@ -167,9 +171,8 @@ async function createYyqtzjc(req, res, next) { ...@@ -167,9 +171,8 @@ async function createYyqtzjc(req, res, next) {
//创建 //创建
await DB.ThTzYyqtzjcTzfx.bulkCreate(yyqtzjcTzfxs); await DB.ThTzYyqtzjcTzfx.bulkCreate(yyqtzjcTzfxs);
await DB.ThTzYyqtzjcrcjc.bulkCreate(yyqtzjcrcjcs); // await DB.ThTzYyqtzjcrcjc.bulkCreate(yyqtzjcrcjcs);
await DB.ThTzYyqtzjcZxjc.bulkCreate(yyqtzjcZxjcs); await DB.ThTzYyqtzjcZxjc.bulkCreate(yyqtzjcZxjcs);
let ret = await DB.ThTzYyqtzjc.create(req.body);
return res.sendData(ret); return res.sendData(ret);
} catch (error) { } catch (error) {
next(error); next(error);
...@@ -182,9 +185,6 @@ async function getYyqtzjcInfo(req, res, next) { ...@@ -182,9 +185,6 @@ async function getYyqtzjcInfo(req, res, next) {
if (req.body.id) { if (req.body.id) {
search.id = req.body.id; search.id = req.body.id;
} }
if (req.body.projectId) {
search.projectId = req.body.projectId;
}
if (_.isEmpty(search)) { if (_.isEmpty(search)) {
return res.sendError(errorMessage.paramsError); return res.sendError(errorMessage.paramsError);
} }
...@@ -194,21 +194,21 @@ async function getYyqtzjcInfo(req, res, next) { ...@@ -194,21 +194,21 @@ async function getYyqtzjcInfo(req, res, next) {
} }
let newyyqtzjcTzfxs = [], newyyqtzjcrcjcs = [], newyyqtzjcZxjcs = []; let newyyqtzjcTzfxs = [], newyyqtzjcrcjcs = [], newyyqtzjcZxjcs = [];
let yyqtzjcTzfxs = await DB.ThTzYyqtzjcTzfx.findAll({ where: { projectId: jsqtzjc.projectId }, raw: true }); let yyqtzjcTzfxs = await DB.ThTzYyqtzjcTzfx.findAll({ where: { projectId: jsqtzjc.projectId, sourceId: req.body.id }, raw: true });
for (let index = 0; index < yyqtzjcTzfxs.length; index++) { for (let index = 0; index < yyqtzjcTzfxs.length; index++) {
let element = yyqtzjcTzfxs[index]; let element = yyqtzjcTzfxs[index];
// fileids.concat(element.tzcbfxhzl || []); // fileids.concat(element.tzcbfxhzl || []);
element.tzcbfxhzl = await DB.File.findAll({ where: { id: { [Op.in]: element.tzcbfxhzl } } }); element.tzcbfxhzl = await DB.File.findAll({ where: { id: { [Op.in]: element.tzcbfxhzl } } });
newyyqtzjcTzfxs.push(element); newyyqtzjcTzfxs.push(element);
} }
let yyqtzjcrcjcs = await DB.ThTzYyqtzjcrcjc.findAll({ where: { projectId: jsqtzjc.projectId }, raw: true }); // let yyqtzjcrcjcs = await DB.ThTzYyqtzjcrcjc.findAll({ where: { projectId: jsqtzjc.projectId , sourceId: req.body.id}, raw: true });
for (let index = 0; index < yyqtzjcrcjcs.length; index++) { // for (let index = 0; index < yyqtzjcrcjcs.length; index++) {
const element = yyqtzjcrcjcs[index]; // const element = yyqtzjcrcjcs[index];
// fileids.concat(element.fxcl || []); // // fileids.concat(element.fxcl || []);
element.fxcl = await DB.File.findAll({ where: { id: { [Op.in]: element.fxcl } } }); // element.fxcl = await DB.File.findAll({ where: { id: { [Op.in]: element.fxcl } } });
newyyqtzjcrcjcs.push(element); // newyyqtzjcrcjcs.push(element);
} // }
let yyqtzjcZxjcs = await DB.ThTzYyqtzjcZxjc.findAll({ where: { projectId: jsqtzjc.projectId }, raw: true }); let yyqtzjcZxjcs = await DB.ThTzYyqtzjcZxjc.findAll({ where: { projectId: jsqtzjc.projectId, sourceId: req.body.id }, raw: true });
for (let index = 0; index < yyqtzjcZxjcs.length; index++) { for (let index = 0; index < yyqtzjcZxjcs.length; index++) {
const element = yyqtzjcZxjcs[index]; const element = yyqtzjcZxjcs[index];
// fileids.concat(element.fjcl || []); // fileids.concat(element.fjcl || []);
...@@ -217,7 +217,7 @@ async function getYyqtzjcInfo(req, res, next) { ...@@ -217,7 +217,7 @@ async function getYyqtzjcInfo(req, res, next) {
} }
jsqtzjc.yyqtzjcTzfxs = newyyqtzjcTzfxs; jsqtzjc.yyqtzjcTzfxs = newyyqtzjcTzfxs;
jsqtzjc.yyqtzjcrcjcs = newyyqtzjcrcjcs; // jsqtzjc.yyqtzjcrcjcs = newyyqtzjcrcjcs;
jsqtzjc.yyqtzjcZxjcs = newyyqtzjcZxjcs; jsqtzjc.yyqtzjcZxjcs = newyyqtzjcZxjcs;
return res.sendData(jsqtzjc); return res.sendData(jsqtzjc);
...@@ -227,7 +227,7 @@ async function getYyqtzjcInfo(req, res, next) { ...@@ -227,7 +227,7 @@ async function getYyqtzjcInfo(req, res, next) {
} }
async function updateYyqtzjc(req, res, next) { async function updateYyqtzjc(req, res, next) {
try { try {
if (!req.body.projectId) { if (!req.body.id) {
return res.sendError(errorMessage.paramsError); return res.sendError(errorMessage.paramsError);
} }
let yyqtzjcTzfxs = req.body.yyqtzjcTzfxs || []; let yyqtzjcTzfxs = req.body.yyqtzjcTzfxs || [];
...@@ -235,6 +235,7 @@ async function updateYyqtzjc(req, res, next) { ...@@ -235,6 +235,7 @@ async function updateYyqtzjc(req, res, next) {
for (let index = 0; index < yyqtzjcTzfxs.length; index++) { for (let index = 0; index < yyqtzjcTzfxs.length; index++) {
let element = yyqtzjcTzfxs[index]; let element = yyqtzjcTzfxs[index];
element.projectId = req.body.projectId; element.projectId = req.body.projectId;
element.sourceId = req.body.id;
element.tzcbfxhzl = (element.tzcbfxhzl || []).map(o => { return o && o.id || o }); element.tzcbfxhzl = (element.tzcbfxhzl || []).map(o => { return o && o.id || o });
if (element.id) { if (element.id) {
ids.push(element.id); ids.push(element.id);
...@@ -243,28 +244,28 @@ async function updateYyqtzjc(req, res, next) { ...@@ -243,28 +244,28 @@ async function updateYyqtzjc(req, res, next) {
newArr.push(element); newArr.push(element);
} }
} }
await DB.ThTzYyqtzjcTzfx.destroy({ where: { projectId: req.body.projectId, id: { [Op.notIn]: ids } } }); // 删除id不在传入id数组里面的(用户在界面删除的) await DB.ThTzYyqtzjcTzfx.destroy({ where: { projectId: req.body.projectId, sourceId: req.body.id, id: { [Op.notIn]: ids } } }); // 删除id不在传入id数组里面的(用户在界面删除的)
await DB.ThTzYyqtzjcTzfx.bulkCreate(newArr);//创建新的 没有id的 await DB.ThTzYyqtzjcTzfx.bulkCreate(newArr);//创建新的 没有id的
await Promise.all(info.map(item => { DB.ThTzYyqtzjcTzfx.update(item, { where: { id: item.id } }) })); await Promise.all(info.map(item => { DB.ThTzYyqtzjcTzfx.update(item, { where: { id: item.id } }) }));
delete req.body.yyqtzjcTzfxs; delete req.body.yyqtzjcTzfxs;
let yyqtzjcrcjcs = req.body.yyqtzjcrcjcs || []; // let yyqtzjcrcjcs = req.body.yyqtzjcrcjcs || [];
let ids1 = [], newArr1 = [], info1 = []; // let ids1 = [], newArr1 = [], info1 = [];
for (let index = 0; index < yyqtzjcrcjcs.length; index++) { // for (let index = 0; index < yyqtzjcrcjcs.length; index++) {
let element = yyqtzjcrcjcs[index]; // let element = yyqtzjcrcjcs[index];
element.projectId = req.body.projectId; // element.projectId = req.body.projectId;
element.fxcl = (element.fxcl || []).map(o => { return o && o.id || o }); // element.fxcl = (element.fxcl || []).map(o => { return o && o.id || o });
if (element.id) { // if (element.id) {
ids1.push(element.id); // ids1.push(element.id);
info1.push(element); // info1.push(element);
} else { // } else {
newArr1.push(element); // newArr1.push(element);
} // }
} // }
await DB.ThTzYyqtzjcrcjc.destroy({ where: { projectId: req.body.projectId, id: { [Op.notIn]: ids1 } } }); // 删除id不在传入id数组里面的(用户在界面删除的) // await DB.ThTzYyqtzjcrcjc.destroy({ where: { projectId: req.body.projectId, id: { [Op.notIn]: ids1 } } }); // 删除id不在传入id数组里面的(用户在界面删除的)
await DB.ThTzYyqtzjcrcjc.bulkCreate(newArr1);//创建新的 没有id的 // await DB.ThTzYyqtzjcrcjc.bulkCreate(newArr1);//创建新的 没有id的
await Promise.all(info1.map(item => { DB.ThTzYyqtzjcrcjc.update(item, { where: { id: item.id } }) })); // await Promise.all(info1.map(item => { DB.ThTzYyqtzjcrcjc.update(item, { where: { id: item.id } }) }));
delete req.body.yyqtzjcrcjcs; // delete req.body.yyqtzjcrcjcs;
let yyqtzjcZxjcs = req.body.yyqtzjcZxjcs || []; let yyqtzjcZxjcs = req.body.yyqtzjcZxjcs || [];
...@@ -272,6 +273,7 @@ async function updateYyqtzjc(req, res, next) { ...@@ -272,6 +273,7 @@ async function updateYyqtzjc(req, res, next) {
for (let index = 0; index < yyqtzjcZxjcs.length; index++) { for (let index = 0; index < yyqtzjcZxjcs.length; index++) {
let element = yyqtzjcZxjcs[index]; let element = yyqtzjcZxjcs[index];
element.projectId = req.body.projectId; element.projectId = req.body.projectId;
element.sourceId = req.body.id;
element.fjcl = (element.fjcl || []).map(o => { return o && o.id || o }); element.fjcl = (element.fjcl || []).map(o => { return o && o.id || o });
if (element.id) { if (element.id) {
ids2.push(element.id); ids2.push(element.id);
...@@ -280,7 +282,7 @@ async function updateYyqtzjc(req, res, next) { ...@@ -280,7 +282,7 @@ async function updateYyqtzjc(req, res, next) {
newArr2.push(element); newArr2.push(element);
} }
} }
await DB.ThTzYyqtzjcZxjc.destroy({ where: { projectId: req.body.projectId, id: { [Op.notIn]: ids2 } } }); // 删除id不在传入id数组里面的(用户在界面删除的) await DB.ThTzYyqtzjcZxjc.destroy({ where: { projectId: req.body.projectId, sourceId: req.body.id, id: { [Op.notIn]: ids2 } } }); // 删除id不在传入id数组里面的(用户在界面删除的)
await DB.ThTzYyqtzjcZxjc.bulkCreate(newArr2);//创建新的 没有id的 await DB.ThTzYyqtzjcZxjc.bulkCreate(newArr2);//创建新的 没有id的
await Promise.all(info2.map(item => { DB.ThTzYyqtzjcZxjc.update(item, { where: { id: item.id } }) })); await Promise.all(info2.map(item => { DB.ThTzYyqtzjcZxjc.update(item, { where: { id: item.id } }) }));
delete req.body.yyqtzjcZxjcs; delete req.body.yyqtzjcZxjcs;
...@@ -332,10 +334,12 @@ async function createTzhpj(req, res, next) { ...@@ -332,10 +334,12 @@ async function createTzhpj(req, res, next) {
req.body.xmgszcbg = (req.body.xmgszcbg || []).map(o => { return o && o.id || o }); req.body.xmgszcbg = (req.body.xmgszcbg || []).map(o => { return o && o.id || o });
req.body.hpjbg = (req.body.hpjbg || []).map(o => { return o && o.id || o }); req.body.hpjbg = (req.body.hpjbg || []).map(o => { return o && o.id || o });
req.body.qsmzqpj = (req.body.qsmzqpj || []).map(o => { return o && o.id || o }); req.body.qsmzqpj = (req.body.qsmzqpj || []).map(o => { return o && o.id || o });
let tzhpjwtzgs = (req.body.tzhpjwtzgs || []).map(o => {o.projectId = req.body.projectId; return o});
let ret = await DB.ThTzhpj.create(req.body);
let tzhpjwtzgs = (req.body.tzhpjwtzgs || []).map(o => { o.projectId = req.body.projectId; o.sourceId = ret.id; return o });
await DB.ThTzhpjwtzg.bulkCreate(tzhpjwtzgs); await DB.ThTzhpjwtzg.bulkCreate(tzhpjwtzgs);
delete req.body.tzhpjwtzgs; delete req.body.tzhpjwtzgs;
let ret = await DB.ThTzhpj.create(req.body);
return res.sendData(ret); return res.sendData(ret);
} catch (error) { } catch (error) {
next(error); next(error);
...@@ -351,6 +355,7 @@ async function updateTzhpj(req, res, next) { ...@@ -351,6 +355,7 @@ async function updateTzhpj(req, res, next) {
for (let index = 0; index < tzhpjwtzgs.length; index++) { for (let index = 0; index < tzhpjwtzgs.length; index++) {
let element = tzhpjwtzgs[index]; let element = tzhpjwtzgs[index];
element.projectId = req.body.projectId; element.projectId = req.body.projectId;
element.sourceId = req.body.id;
if (element.id) { if (element.id) {
ids1.push(element.id); ids1.push(element.id);
info1.push(element); info1.push(element);
...@@ -358,7 +363,7 @@ async function updateTzhpj(req, res, next) { ...@@ -358,7 +363,7 @@ async function updateTzhpj(req, res, next) {
newArr1.push(element); newArr1.push(element);
} }
} }
await DB.ThTzhpjwtzg.destroy({ where: { projectId: req.body.projectId, id: { [Op.notIn]: ids1 } } }); // 删除id不在传入id数组里面的(用户在界面删除的) await DB.ThTzhpjwtzg.destroy({ where: { projectId: req.body.projectId, sourceId: req.body.id, id: { [Op.notIn]: ids1 } } }); // 删除id不在传入id数组里面的(用户在界面删除的)
await DB.ThTzhpjwtzg.bulkCreate(newArr1);//创建新的 没有id的 await DB.ThTzhpjwtzg.bulkCreate(newArr1);//创建新的 没有id的
await Promise.all(info1.map(item => { DB.ThTzhpjwtzg.update(item, { where: { id: item.id } }) })); await Promise.all(info1.map(item => { DB.ThTzhpjwtzg.update(item, { where: { id: item.id } }) }));
delete req.body.tzhpjwtzgs; delete req.body.tzhpjwtzgs;
...@@ -406,9 +411,6 @@ async function getTzhpjInfo(req, res, next) { ...@@ -406,9 +411,6 @@ async function getTzhpjInfo(req, res, next) {
if (req.body.id) { if (req.body.id) {
search.id = req.body.id; search.id = req.body.id;
} }
if (req.body.projectId) {
search.projectId = req.body.projectId;
}
if (_.isEmpty(search)) { if (_.isEmpty(search)) {
return res.sendError(errorMessage.paramsError); return res.sendError(errorMessage.paramsError);
} }
...@@ -427,7 +429,7 @@ async function getTzhpjInfo(req, res, next) { ...@@ -427,7 +429,7 @@ async function getTzhpjInfo(req, res, next) {
tzhpj.hpjbg = tzhpj.hpjbg.map(o => { return fileMap[o] }); tzhpj.hpjbg = tzhpj.hpjbg.map(o => { return fileMap[o] });
tzhpj.qsmzqpj = tzhpj.qsmzqpj.map(o => { return fileMap[o] }); tzhpj.qsmzqpj = tzhpj.qsmzqpj.map(o => { return fileMap[o] });
tzhpj.tzhpjwtzgs = await DB.ThTzhpjwtzg.findAll({where: {projectId: tzhpj.projectId}, raw: true}); tzhpj.tzhpjwtzgs = await DB.ThTzhpjwtzg.findAll({ where: { projectId: tzhpj.projectId,sourceId: req.body.id }, raw: true });
return res.sendData(tzhpj); return res.sendData(tzhpj);
} catch (error) { } catch (error) {
next(error); next(error);
...@@ -439,9 +441,9 @@ async function getTzhpjInfo(req, res, next) { ...@@ -439,9 +441,9 @@ async function getTzhpjInfo(req, res, next) {
async function createYjgl(req, res, next) { async function createYjgl(req, res, next) {
try { try {
// //
req.body.zbyzyj = (req.body.zbyzyj || []).map(o => {return o && o.id || o}); req.body.zbyzyj = (req.body.zbyzyj || []).map(o => { return o && o.id || o });
req.body.qzlyzzyj = (req.body.qzlyzzyj || []).map(o => {return o && o.id || o}); req.body.qzlyzzyj = (req.body.qzlyzzyj || []).map(o => { return o && o.id || o });
req.body.qmyj = (req.body.qmyj || []).map(o => {return o && o.id || o}); req.body.qmyj = (req.body.qmyj || []).map(o => { return o && o.id || o });
let ret = await DB.ThYjgl.create(req.body); let ret = await DB.ThYjgl.create(req.body);
return res.sendData(ret); return res.sendData(ret);
} catch (error) { } catch (error) {
...@@ -451,11 +453,11 @@ async function createYjgl(req, res, next) { ...@@ -451,11 +453,11 @@ async function createYjgl(req, res, next) {
async function updateYjgl(req, res, next) { async function updateYjgl(req, res, next) {
try { try {
req.body.zbyzyj = (req.body.zbyzyj || []).map(o => {return o && o.id || o}); req.body.zbyzyj = (req.body.zbyzyj || []).map(o => { return o && o.id || o });
req.body.qzlyzzyj = (req.body.qzlyzzyj || []).map(o => {return o && o.id || o}); req.body.qzlyzzyj = (req.body.qzlyzzyj || []).map(o => { return o && o.id || o });
req.body.qmyj = (req.body.qmyj || []).map(o => {return o && o.id || o}); req.body.qmyj = (req.body.qmyj || []).map(o => { return o && o.id || o });
await DB.ThYjgl.update(req.body, {where: {id: req.body.id}}); await DB.ThYjgl.update(req.body, { where: { id: req.body.id } });
return res.sendData(); return res.sendData();
} catch (error) { } catch (error) {
next(error); next(error);
...@@ -464,7 +466,7 @@ async function updateYjgl(req, res, next) { ...@@ -464,7 +466,7 @@ async function updateYjgl(req, res, next) {
async function getYjglList(req, res, next) { async function getYjglList(req, res, next) {
try { try {
let page = req.body.page || 1; let page = req.body.page || 1;
let limit = req.body.pagesize || req.body.pageSize || 10; let limit = req.body.pagesize || req.body.pageSize || 10;
let offset = (page - 1) * limit; let offset = (page - 1) * limit;
...@@ -496,7 +498,7 @@ async function getYjglList(req, res, next) { ...@@ -496,7 +498,7 @@ async function getYjglList(req, res, next) {
async function getYjglInfo(req, res, next) { async function getYjglInfo(req, res, next) {
try { try {
let search = {}; let search = {};
if (req.body.id) { if (req.body.id) {
search.id = req.body.id; search.id = req.body.id;
} }
......
...@@ -180,6 +180,23 @@ async function getTzmbzrsInfo(req, res, next) { ...@@ -180,6 +180,23 @@ async function getTzmbzrsInfo(req, res, next) {
} }
} }
async function getProTzmbzrs(req, res, next) {
try {
if(!req.body.projectId) {
return res.sendError(errorMessage.paramsError);
}
let mbzrss = await DB.TzTzmbzrs.findAll({
where: {projectId: req.body.projectId, del: 0},
attributes: ['zrslx'],
raw: true
});
mbzrss = _.compact(mbzrss.map(o => {return o.zrslx}));
return res.sendData(mbzrss);
} catch (error) {
next(error);
}
}
async function createTzkz(req, res, next) { async function createTzkz(req, res, next) {
try { try {
...@@ -992,10 +1009,11 @@ async function createXmtc(req, res, next) { ...@@ -992,10 +1009,11 @@ async function createXmtc(req, res, next) {
} }
// 1. 文件 // 1. 文件
req.body.tcwj = (req.body.tcwj || []).map(o => { return o && o.id || o }); req.body.tcwj = (req.body.tcwj || []).map(o => { return o && o.id || o });
let tccwzbs = (req.body.tccwzbs || []).map(o => { o.projectId = req.body.projectId; return o; }); let ret = await DB.TzXmtc.create(req.body);
let tccwzbs = (req.body.tccwzbs || []).map(o => { o.projectId = req.body.projectId;o.sourceId = ret.id; return o; });
delete req.body.tccwzbs; delete req.body.tccwzbs;
await DB.TzXmtcCwzb.bulkCreate(tccwzbs); await DB.TzXmtcCwzb.bulkCreate(tccwzbs);
let ret = await DB.TzXmtc.create(req.body);
return res.sendData(ret); return res.sendData(ret);
} catch (error) { } catch (error) {
next(error); next(error);
...@@ -1019,7 +1037,7 @@ async function getXmtcInfo(req, res, next) { ...@@ -1019,7 +1037,7 @@ async function getXmtcInfo(req, res, next) {
return res.sendError(errorMessage.resourceNotFound); return res.sendError(errorMessage.resourceNotFound);
} }
let tccwzbs = await DB.TzXmtcCwzb.findAll({ let tccwzbs = await DB.TzXmtcCwzb.findAll({
where: { projectId: xmtc.projectId }, where: { projectId: xmtc.projectId, sourceId: xmtc.id },
raw: true, raw: true,
}); });
...@@ -1039,6 +1057,7 @@ async function updateXmtc(req, res, next) { ...@@ -1039,6 +1057,7 @@ async function updateXmtc(req, res, next) {
for (let index = 0; index < tccwzbs.length; index++) { for (let index = 0; index < tccwzbs.length; index++) {
const element = tccwzbs[index]; const element = tccwzbs[index];
element.projectId = req.body.projectId; element.projectId = req.body.projectId;
element.sourceId = req.body.id;
element.wj = (element.wj || []).map(o => { return o && o.id || o }); element.wj = (element.wj || []).map(o => { return o && o.id || o });
if (element.id) { if (element.id) {
ids.push(element.id); ids.push(element.id);
...@@ -1047,7 +1066,7 @@ async function updateXmtc(req, res, next) { ...@@ -1047,7 +1066,7 @@ async function updateXmtc(req, res, next) {
newArr.push(element); newArr.push(element);
} }
} }
await DB.TzXmtcCwzb.destroy({ where: { projectId: req.body.projectId, id: { [Op.notIn]: ids } } }); // 删除id不在传入id数组里面的(用户在界面删除的) await DB.TzXmtcCwzb.destroy({ where: { projectId: req.body.projectId, sourceId: req.body.id, id: { [Op.notIn]: ids } } }); // 删除id不在传入id数组里面的(用户在界面删除的)
await DB.TzXmtcCwzb.bulkCreate(newArr);//创建新的 没有id的 await DB.TzXmtcCwzb.bulkCreate(newArr);//创建新的 没有id的
await Promise.all(info.map(item => { return DB.TzXmtcCwzb.update(item, { where: { id: item.id } }) })); await Promise.all(info.map(item => { return DB.TzXmtcCwzb.update(item, { where: { id: item.id } }) }));
delete req.body.tccwzbs; delete req.body.tccwzbs;
...@@ -1097,6 +1116,7 @@ async function deleteTzmbzrsInfo(req, res, next) { ...@@ -1097,6 +1116,7 @@ async function deleteTzmbzrsInfo(req, res, next) {
next(error); next(error);
} }
} }
async function deleteTzkz(req, res, next) { async function deleteTzkz(req, res, next) {
try { try {
await DB.TzTzkz.update({ del: 1 }, { where: { id: req.body.id } }); await DB.TzTzkz.update({ del: 1 }, { where: { id: req.body.id } });
...@@ -1174,4 +1194,5 @@ module.exports = { ...@@ -1174,4 +1194,5 @@ module.exports = {
deleteJsqtzhs, deleteJsqtzhs,
deleteJsqtzjc, deleteJsqtzjc,
deleteZdsxsp, deleteZdsxsp,
getProTzmbzrs,
} }
\ No newline at end of file
...@@ -22,11 +22,50 @@ const ThTzhpj = sequelize.define('ThTzhpj', { ...@@ -22,11 +22,50 @@ const ThTzhpj = sequelize.define('ThTzhpj', {
type: DataTypes.JSON, type: DataTypes.JSON,
comment: "后评价报告", comment: "后评价报告",
}, },
hpjsj: {
type: DataTypes.DATE,
get() {
const rawValue = this.getDataValue('hpjsj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
hpjbgbzdw: {
type: DataTypes.STRING,
comment: "报告编制单位",
},
hpjpsdw: {
type: DataTypes.STRING,
comment: "评审单位",
},
hpjpjjg: {
type: DataTypes.TEXT,
comment: "后评价评价结果",
},
qsmzqpj: { qsmzqpj: {
type: DataTypes.JSON, type: DataTypes.JSON,
comment: "全生命周期评价", comment: "全生命周期评价",
}, },
qsmsj: {
type: DataTypes.DATE,
get() {
const rawValue = this.getDataValue('qsmsj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
},
qsmbgbzdw: {
type: DataTypes.STRING,
comment: "全生命报告编制单位",
},
qsmpsdw: {
type: DataTypes.STRING,
comment: "全生命评审单位",
},
qsmpjjg: {
type: DataTypes.TEXT,
comment: "全生命评价结果",
},
projectId: { projectId: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
comment: "所属项目ID", comment: "所属项目ID",
...@@ -59,9 +98,9 @@ const ThTzhpj = sequelize.define('ThTzhpj', { ...@@ -59,9 +98,9 @@ const ThTzhpj = sequelize.define('ThTzhpj', {
// 同步模型到数据库(创建表) // 同步模型到数据库(创建表)
ThTzhpj.sync({ ThTzhpj.sync({
force: false, // force: false,
// force: true ,//会删除已存在表并重新创建 // force: true ,//会删除已存在表并重新创建
// alter: true alter: true
}) })
.then(() => { .then(() => {
console.log('ThTzhpj 表同步成功'); console.log('ThTzhpj 表同步成功');
......
...@@ -41,7 +41,10 @@ const ThTzhpjwtzg = sequelize.define('ThTzhpjwtzg', { ...@@ -41,7 +41,10 @@ const ThTzhpjwtzg = sequelize.define('ThTzhpjwtzg', {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
comment: "是否关闭", comment: "是否关闭",
}, },
sourceId: {
type: DataTypes.INTEGER,
comment: "所属投资控制主表id"
},
projectId: { projectId: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
comment: "所属项目ID", comment: "所属项目ID",
...@@ -74,9 +77,9 @@ const ThTzhpjwtzg = sequelize.define('ThTzhpjwtzg', { ...@@ -74,9 +77,9 @@ const ThTzhpjwtzg = sequelize.define('ThTzhpjwtzg', {
// 同步模型到数据库(创建表) // 同步模型到数据库(创建表)
ThTzhpjwtzg.sync({ ThTzhpjwtzg.sync({
force: false, // force: false,
// force: true ,//会删除已存在表并重新创建 // force: true ,//会删除已存在表并重新创建
// alter: true alter: true
}) })
.then(() => { .then(() => {
console.log('ThTzhpjwtzg 表同步成功'); console.log('ThTzhpjwtzg 表同步成功');
......
...@@ -48,7 +48,10 @@ const ThYyqtzhszb = sequelize.define('ThYyqtzhszb', { ...@@ -48,7 +48,10 @@ const ThYyqtzhszb = sequelize.define('ThYyqtzhszb', {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
comment: "分组" comment: "分组"
}, },
sourceId: {
type: DataTypes.INTEGER,
comment: "所属投资控制主表id"
},
projectId: { projectId: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
comment: "所属项目ID", comment: "所属项目ID",
......
...@@ -28,7 +28,10 @@ const ThYyqtzjcTzfx = sequelize.define('ThYyqtzjcTzfx', { ...@@ -28,7 +28,10 @@ const ThYyqtzjcTzfx = sequelize.define('ThYyqtzjcTzfx', {
type: DataTypes.JSON, type: DataTypes.JSON,
comment: "投资(成本)分析会资料" comment: "投资(成本)分析会资料"
}, },
sourceId: {
type: DataTypes.INTEGER,
comment: "所属投资控制主表id"
},
projectId: { projectId: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
comment: "所属项目ID", comment: "所属项目ID",
......
...@@ -38,7 +38,10 @@ const ThYyqtzjcZxjc = sequelize.define('ThYyqtzjcZxjc', { ...@@ -38,7 +38,10 @@ const ThYyqtzjcZxjc = sequelize.define('ThYyqtzjcZxjc', {
comment: "附件材料" comment: "附件材料"
}, },
sourceId: {
type: DataTypes.INTEGER,
comment: "所属投资控制主表id"
},
projectId: { projectId: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
comment: "所属项目ID", comment: "所属项目ID",
......
const { DataTypes } = require('sequelize'); // const { DataTypes } = require('sequelize');
const sequelize = require('../index'); // const sequelize = require('../index');
const moment = require('moment'); // const moment = require('moment');
//投中管理- 建设期投资检查 ---日常检查 对投资目标偏差每半年进行一次系统盘点,上传分析材料 // //投中管理- 建设期投资检查 ---日常检查 对投资目标偏差每半年进行一次系统盘点,上传分析材料
const ThYyqtzjcrcjc = sequelize.define('ThYyqtzjcrcjc', { // const ThYyqtzjcrcjc = sequelize.define('ThYyqtzjcrcjc', {
id: { // id: {
type: DataTypes.INTEGER, // type: DataTypes.INTEGER,
primaryKey: true, // primaryKey: true,
autoIncrement: true // autoIncrement: true
}, // },
kssj: { // kssj: {
type: DataTypes.DATE, // type: DataTypes.DATE,
comment: "开始时间", // comment: "开始时间",
get() { // get() {
const rawValue = this.getDataValue('kssj'); // const rawValue = this.getDataValue('kssj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : ''; // return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
} // }
}, // },
jssj: { // jssj: {
type: DataTypes.DATE, // type: DataTypes.DATE,
comment: "结束时间", // comment: "结束时间",
get() { // get() {
const rawValue = this.getDataValue('jssj'); // const rawValue = this.getDataValue('jssj');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : ''; // return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
} // }
}, // },
pdnrsm: { // pdnrsm: {
type: DataTypes.TEXT, // type: DataTypes.TEXT,
comment: "盘点内容说明" // comment: "盘点内容说明"
}, // },
fxcl: { // fxcl: {
type: DataTypes.JSON, // type: DataTypes.JSON,
comment: "分析材料" // comment: "分析材料"
}, // },
projectId: { // projectId: {
type: DataTypes.INTEGER, // type: DataTypes.INTEGER,
comment: "所属项目ID", // comment: "所属项目ID",
}, // },
del: { // del: {
type: DataTypes.INTEGER, // type: DataTypes.INTEGER,
defaultValue: 0, // defaultValue: 0,
comment: "0 正常 1 删除" // comment: "0 正常 1 删除"
}, // },
createdAt: { // createdAt: {
type: DataTypes.DATE, // type: DataTypes.DATE,
defaultValue: new Date(), // defaultValue: new Date(),
get() { // get() {
const rawValue = this.getDataValue('createdAt'); // const rawValue = this.getDataValue('createdAt');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : ''; // return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
} // }
}, // },
updatedAt: { // 同样处理 updatedAt // updatedAt: { // 同样处理 updatedAt
type: DataTypes.DATE, // type: DataTypes.DATE,
defaultValue: new Date(), // defaultValue: new Date(),
get() { // get() {
const rawValue = this.getDataValue('updatedAt'); // const rawValue = this.getDataValue('updatedAt');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : ''; // return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
} // }
} // }
}, { // }, {
tableName: 'jt_th_yyqtzjcrcjc', // 指定表名(如果与模型名不同) // tableName: 'jt_th_yyqtzjcrcjc', // 指定表名(如果与模型名不同)
timestamps: true, // 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置) // timestamps: true, // 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
}); // });
// 同步模型到数据库(创建表) // // 同步模型到数据库(创建表)
ThYyqtzjcrcjc.sync({ // ThYyqtzjcrcjc.sync({
// force: false, // // force: false,
// force: true ,//会删除已存在表并重新创建 // // force: true ,//会删除已存在表并重新创建
alter: true // alter: true
}) // })
.then(() => { // .then(() => {
console.log('ThYyqtzjcrcjc 表同步成功'); // console.log('ThYyqtzjcrcjc 表同步成功');
}); // });
module.exports = ThYyqtzjcrcjc; // module.exports = ThYyqtzjcrcjc;
\ No newline at end of file \ No newline at end of file
...@@ -20,7 +20,10 @@ const TzXmtcCwzb = sequelize.define('TzXmtcCwzb', { ...@@ -20,7 +20,10 @@ const TzXmtcCwzb = sequelize.define('TzXmtcCwzb', {
comment: "指标数值", comment: "指标数值",
}, },
sourceId: {
type: DataTypes.INTEGER,
comment: "所属投资控制主表id"
},
projectId: { projectId: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
comment: "所属项目ID", comment: "所属项目ID",
......
...@@ -53,14 +53,16 @@ router.post('/getProFlowRecord', projectController.getProFlowRecord) ...@@ -53,14 +53,16 @@ router.post('/getProFlowRecord', projectController.getProFlowRecord)
* 投中管理 * 投中管理
*/ */
//目标责任书 //2.1 目标责任书
router.post('/createTzmbzrs', projectTzController.createTzmbzrs); router.post('/createTzmbzrs', projectTzController.createTzmbzrs);
router.post('/updateTzmbzrs', projectTzController.updateTzmbzrs); router.post('/updateTzmbzrs', projectTzController.updateTzmbzrs);
router.post('/getTzmbzrsList', projectTzController.getTzmbzrsList); router.post('/getTzmbzrsList', projectTzController.getTzmbzrsList);
router.post('/getTzmbzrsInfo', projectTzController.getTzmbzrsInfo); router.post('/getTzmbzrsInfo', projectTzController.getTzmbzrsInfo);
router.post('/deleteTzmbzrs', projectTzController.deleteTzmbzrsInfo); router.post('/deleteTzmbzrs', projectTzController.deleteTzmbzrsInfo);
//投资控制 router.post('/getProTzmbzrs', projectTzController.getProTzmbzrs);
//2.2 投资控制
router.post('/createTzkz', projectTzController.createTzkz); router.post('/createTzkz', projectTzController.createTzkz);
router.post('/updateTzkz', projectTzController.updateTzkz); router.post('/updateTzkz', projectTzController.updateTzkz);
...@@ -68,27 +70,27 @@ router.post('/deleteTzkz', projectTzController.deleteTzkz); ...@@ -68,27 +70,27 @@ router.post('/deleteTzkz', projectTzController.deleteTzkz);
router.post('/getTzkzList', projectTzController.getTzkzList); router.post('/getTzkzList', projectTzController.getTzkzList);
router.post('/getTzkzInfo', projectTzController.getTzkzInfo); router.post('/getTzkzInfo', projectTzController.getTzkzInfo);
//重大风险防控 //2.3 重大风险防控
router.post('/createZdfx', projectTzController.createZdfx); router.post('/createZdfx', projectTzController.createZdfx);
router.post('/updateZdfx', projectTzController.updateZdfx); router.post('/updateZdfx', projectTzController.updateZdfx);
router.post('/deleteZdfx', projectTzController.deleteZdfx); router.post('/deleteZdfx', projectTzController.deleteZdfx);
router.post('/getZdfxList', projectTzController.getZdfxList); router.post('/getZdfxList', projectTzController.getZdfxList);
router.post('/getZdfxInfo', projectTzController.getZdfxInfo); router.post('/getZdfxInfo', projectTzController.getZdfxInfo);
//建设期投资回收 //2.4 建设期投资回收
router.post('/createJsqtzhs', projectTzController.createJsqtzhs); router.post('/createJsqtzhs', projectTzController.createJsqtzhs);
router.post('/updateJsqtzhs', projectTzController.updateJsqtzhs); router.post('/updateJsqtzhs', projectTzController.updateJsqtzhs);
router.post('/deleteJsqtzhs', projectTzController.deleteJsqtzhs); router.post('/deleteJsqtzhs', projectTzController.deleteJsqtzhs);
router.post('/getJsqtzhsList', projectTzController.getJsqtzhsList); router.post('/getJsqtzhsList', projectTzController.getJsqtzhsList);
router.post('/getJsqtzhsInfo', projectTzController.getJsqtzhsInfo); router.post('/getJsqtzhsInfo', projectTzController.getJsqtzhsInfo);
//建设期投资检查 //2.5 建设期投资检查
router.post('/createJsqtzjc', projectTzController.createJsqtzjc); router.post('/createJsqtzjc', projectTzController.createJsqtzjc);
router.post('/updateJsqtzjc', projectTzController.updateJsqtzjc); router.post('/updateJsqtzjc', projectTzController.updateJsqtzjc);
router.post('/deleteJsqtzjc', projectTzController.deleteJsqtzjc); router.post('/deleteJsqtzjc', projectTzController.deleteJsqtzjc);
router.post('/getJsqtzjcList', projectTzController.getJsqtzjcList); router.post('/getJsqtzjcList', projectTzController.getJsqtzjcList);
router.post('/getJsqtzjcInfo', projectTzController.getJsqtzjcInfo); router.post('/getJsqtzjcInfo', projectTzController.getJsqtzjcInfo);
//重大事项审批 //2.6 重大事项审批
router.post('/createZdsxsp', projectTzController.createZdsxsp); router.post('/createZdsxsp', projectTzController.createZdsxsp);
router.post('/updateZdsxsp', projectTzController.updateZdsxsp); router.post('/updateZdsxsp', projectTzController.updateZdsxsp);
router.post('/deleteZdsxsp', projectTzController.deleteZdsxsp); router.post('/deleteZdsxsp', projectTzController.deleteZdsxsp);
...@@ -96,7 +98,7 @@ router.post('/getZdsxspList', projectTzController.getZdsxspList); ...@@ -96,7 +98,7 @@ router.post('/getZdsxspList', projectTzController.getZdsxspList);
router.post('/getZdsxspInfo', projectTzController.getZdsxspInfo); router.post('/getZdsxspInfo', projectTzController.getZdsxspInfo);
//项目退出-------以下sourceId待改 //2.8 项目退出-------以下sourceId待改
router.post('/createXmtc', projectTzController.createXmtc); router.post('/createXmtc', projectTzController.createXmtc);
router.post('/updateXmtc', projectTzController.updateXmtc); router.post('/updateXmtc', projectTzController.updateXmtc);
router.post('/getXmtcList', projectTzController.getXmtcList); router.post('/getXmtcList', projectTzController.getXmtcList);
...@@ -107,24 +109,24 @@ router.post('/getXmtcInfo', projectTzController.getXmtcInfo); ...@@ -107,24 +109,24 @@ router.post('/getXmtcInfo', projectTzController.getXmtcInfo);
* 投后 * 投后
*/ */
//运营期投资回收 //运营期投资回收 --- 参考建设期投资回收
router.post('/createYyqtzhs', projectThController.createYyqtzhs); router.post('/createYyqtzhs', projectThController.createYyqtzhs);
router.post('/updateYyqtzhs', projectThController.updateYyqtzhs); router.post('/updateYyqtzhs', projectThController.updateYyqtzhs);
router.post('/getYyqtzhsList', projectThController.getYyqtzhsList); router.post('/getYyqtzhsList', projectThController.getYyqtzhsList);
router.post('/getYyqtzhsInfo', projectThController.getYyqtzhsInfo); router.post('/getYyqtzhsInfo', projectThController.getYyqtzhsInfo);
// 运营期投资检查 //3.2 运营期投资检查 参考建设期投资检查
router.post('/createYyqtzjc', projectThController.createYyqtzjc); router.post('/createYyqtzjc', projectThController.createYyqtzjc);
router.post('/updateYyqtzjc', projectThController.updateYyqtzjc); router.post('/updateYyqtzjc', projectThController.updateYyqtzjc);
router.post('/getYyqtzjcList', projectThController.getYyqtzjcList); router.post('/getYyqtzjcList', projectThController.getYyqtzjcList);
router.post('/getYyqtzjcInfo', projectThController.getYyqtzjcInfo); router.post('/getYyqtzjcInfo', projectThController.getYyqtzjcInfo);
//投资后评价 //3.3 投资后评价
router.post('/createTzhpj', projectThController.createTzhpj); router.post('/createTzhpj', projectThController.createTzhpj);
router.post('/updateTzhpj', projectThController.updateTzhpj); router.post('/updateTzhpj', projectThController.updateTzhpj);
router.post('/getTzhpjList', projectThController.getTzhpjList); router.post('/getTzhpjList', projectThController.getTzhpjList);
router.post('/getTzhpjInfo', projectThController.getTzhpjInfo); router.post('/getTzhpjInfo', projectThController.getTzhpjInfo);
//移交管理 //3.4 移交管理
router.post('/createYjgl', projectThController.createYjgl); router.post('/createYjgl', projectThController.createYjgl);
router.post('/updateYjgl', projectThController.updateYjgl); router.post('/updateYjgl', projectThController.updateYjgl);
router.post('/getYjglList', projectThController.getYjglList); router.post('/getYjglList', projectThController.getYjglList);
......
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