|
@@ -213,6 +213,8 @@ module.exports = app => {
|
|
|
const rptId = params.rptId;
|
|
|
const ttlPgs = params.ttlPgs;
|
|
|
const uuid = params.uuid;
|
|
|
+ const reportName = params.reportName;
|
|
|
+ const userId = ctx.session.sessionUser.accountId;
|
|
|
const content = params.content;
|
|
|
const orgArchiveList = await ctx.service.rptArchiveEncryption.getPrjStgArchiveEncryption(prjId, stgId);
|
|
|
if (orgArchiveList.length > 0) {
|
|
@@ -225,6 +227,8 @@ module.exports = app => {
|
|
|
// 最后打脸了,还真的要考虑不同的uuid,不早说,TNND
|
|
|
item.encryption = content;
|
|
|
item.total_page = ttlPgs;
|
|
|
+ item.user_id = userId;
|
|
|
+ item.report_name = reportName;
|
|
|
hasArchive = true;
|
|
|
break;
|
|
|
}
|
|
@@ -232,7 +236,7 @@ module.exports = app => {
|
|
|
}
|
|
|
if (!hasArchive) {
|
|
|
// 表示有新的要加
|
|
|
- contentArr.push({ rpt_id: rptId, uuid, total_page: ttlPgs, encryption: content });
|
|
|
+ contentArr.push({ rpt_id: rptId, uuid, total_page: ttlPgs, encryption: content, user_id: userId, report_name: reportName });
|
|
|
} else {
|
|
|
//
|
|
|
}
|
|
@@ -242,7 +246,7 @@ module.exports = app => {
|
|
|
} else {
|
|
|
// 需要增加
|
|
|
const archiveArr = [];
|
|
|
- archiveArr.push({ rpt_id: rptId, uuid, total_page: ttlPgs, encryption: content });
|
|
|
+ archiveArr.push({ rpt_id: rptId, uuid, total_page: ttlPgs, encryption: content, user_id: userId, report_name: reportName });
|
|
|
const addedRst = await ctx.service.rptArchiveEncryption.createArchiveEncryption(prjId, stgId, archiveArr);
|
|
|
// console.log(addedRst);
|
|
|
ctx.body = { err: 0, msg: '', data: { addedRst: archiveArr } };
|