|
|
@@ -425,9 +425,9 @@ function getMultiRptsCommon(user_id, prj_id, rpt_ids, pageSize, orientation, cus
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function getBillsSummaryReportPages(user_id, prjIds, rpt_id, pageSize, orientation, customizeCfg, option, outputType, cb) {
|
|
|
+function getBillsSummaryReportPages(req, user_id, prjIds, rpt_id, pageSize, orientation, customizeCfg, option, outputType, cb) {
|
|
|
let rptTpl = null;
|
|
|
- rptTplDataFacade.getBudgetSummayDatas(prjIds).then(function(summaryRawDataRst) {
|
|
|
+ rptTplDataFacade.getBudgetSummayDatas(prjIds, req.session.sessionCompilation.overWriteUrl).then(function(summaryRawDataRst) {
|
|
|
// console.log(summaryRawDataRst);
|
|
|
rptTplFacade.getRptTemplate(rpt_id).then(function(rptTpl) {
|
|
|
let rptDataUtil = new rptDataExtractor();
|
|
|
@@ -465,7 +465,7 @@ function getBillsSummaryReportPages(user_id, prjIds, rpt_id, pageSize, orientati
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function getSummaryComboPages(user_id, prjIds, billsSummaryRpt_ids, gljSummaryRpt_ids, pageSize, orientation, customizeCfg, option, outputType, cb) {
|
|
|
+function getSummaryComboPages(req, user_id, prjIds, billsSummaryRpt_ids, gljSummaryRpt_ids, pageSize, orientation, customizeCfg, option, outputType, cb) {
|
|
|
let pageRstArr = [];
|
|
|
let pri_setup_rpt_tpl_data = function (rptTpl, summaryRawDataRst) {
|
|
|
let rptDataUtil = new rptDataExtractor();
|
|
|
@@ -506,7 +506,7 @@ function getSummaryComboPages(user_id, prjIds, billsSummaryRpt_ids, gljSummaryRp
|
|
|
}
|
|
|
}
|
|
|
if (billRpts.length > 0) {
|
|
|
- rptTplDataFacade.getBudgetSummayDatas(prjIds).then(function(summaryRawDataRst) {
|
|
|
+ rptTplDataFacade.getBudgetSummayDatas(prjIds, req.session.sessionCompilation.overWriteUrl).then(function(summaryRawDataRst) {
|
|
|
let savedBillsData = [];
|
|
|
Object.assign(savedBillsData, summaryRawDataRst.SummaryAuditDetail);
|
|
|
for (let idx = 0; idx < billRpts.length; idx++) {
|
|
|
@@ -658,7 +658,7 @@ module.exports = {
|
|
|
callback(req, res, '数据有误', null);
|
|
|
} else {
|
|
|
if ((rpt_bill_tpl_ids && rpt_bill_tpl_ids.length > 0) || (rpt_glj_tpl_ids && rpt_glj_tpl_ids.length > 0)) {
|
|
|
- getSummaryComboPages(user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
+ getSummaryComboPages(req, user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
callback(req, res, err, rptSumPageRstArray.concat(rptPageRstArray));
|
|
|
});
|
|
|
} else {
|
|
|
@@ -667,7 +667,7 @@ module.exports = {
|
|
|
}
|
|
|
});
|
|
|
} else if ((rpt_bill_tpl_ids && rpt_bill_tpl_ids.length > 0) || (rpt_glj_tpl_ids && rpt_glj_tpl_ids.length > 0)) {
|
|
|
- getSummaryComboPages(user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
+ getSummaryComboPages(req, user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
callback(req, res, err, rptSumPageRstArray);
|
|
|
});
|
|
|
}
|
|
|
@@ -682,7 +682,7 @@ module.exports = {
|
|
|
customizeCfg = params.custCfg
|
|
|
;
|
|
|
let user_id = req.session.sessionUser.id;
|
|
|
- getBillsSummaryReportPages(user_id, prjIds, rpt_id, pageSize, orientation, customizeCfg, null, JV.OUTPUT_TYPE_NORMAL, function (err, pageRst) {
|
|
|
+ getBillsSummaryReportPages(req, user_id, prjIds, rpt_id, pageSize, orientation, customizeCfg, null, JV.OUTPUT_TYPE_NORMAL, function (err, pageRst) {
|
|
|
callback(req, res, err, pageRst);
|
|
|
});
|
|
|
},
|
|
|
@@ -792,7 +792,7 @@ module.exports = {
|
|
|
callback(req, res, '数据有误', null);
|
|
|
} else {
|
|
|
if ((rpt_bill_tpl_ids && rpt_bill_tpl_ids.length > 0) || (rpt_glj_tpl_ids && rpt_glj_tpl_ids.length > 0)) {
|
|
|
- getSummaryComboPages(user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
+ getSummaryComboPages(req, user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
rpt_xl_util.exportExcelInOneBook(rptPageRstArray.concat(rptSumPageRstArray), pageSize, rptName, function(uuidName){
|
|
|
let fileRst = {uuid: uuidName, reportName: rptName};
|
|
|
callback(req, res, err, fileRst);
|
|
|
@@ -807,7 +807,7 @@ module.exports = {
|
|
|
}
|
|
|
});
|
|
|
} else if ((rpt_bill_tpl_ids && rpt_bill_tpl_ids.length > 0) || (rpt_glj_tpl_ids && rpt_glj_tpl_ids.length > 0)) {
|
|
|
- getSummaryComboPages(user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptPageRstArray) {
|
|
|
+ getSummaryComboPages(req, user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptPageRstArray) {
|
|
|
rpt_xl_util.exportExcelInOneBook(rptPageRstArray, pageSize, rptName, function(uuidName){
|
|
|
let fileRst = {uuid: uuidName, reportName: rptName};
|
|
|
callback(req, res, err, fileRst);
|
|
|
@@ -905,7 +905,7 @@ module.exports = {
|
|
|
callback(req, res, '数据生成错误', null);
|
|
|
} else {
|
|
|
if ((rpt_bill_tpl_ids && rpt_bill_tpl_ids.length > 0) || (rpt_glj_tpl_ids && rpt_glj_tpl_ids.length > 0)) {
|
|
|
- getSummaryComboPages(user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
+ getSummaryComboPages(req, user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
let parallelFunctions = [];
|
|
|
pri_Add_Parallel_Functions(parallelFunctions, rptPageRstArray, rpt_names, err);
|
|
|
pri_Add_Parallel_Functions(parallelFunctions, rptSumPageRstArray, sum_rpt_names, err);
|
|
|
@@ -919,7 +919,7 @@ module.exports = {
|
|
|
}
|
|
|
});
|
|
|
} else if ((rpt_bill_tpl_ids && rpt_bill_tpl_ids.length > 0) || (rpt_glj_tpl_ids && rpt_glj_tpl_ids.length > 0)) {
|
|
|
- getSummaryComboPages(user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
+ getSummaryComboPages(req, user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
let parallelFunctions = [];
|
|
|
pri_Add_Parallel_Functions(parallelFunctions, rptSumPageRstArray, sum_rpt_names, err);
|
|
|
pri_Run_Parallel_Functions(parallelFunctions);
|
|
|
@@ -1110,7 +1110,7 @@ module.exports = {
|
|
|
} else {
|
|
|
if ((rpt_bill_tpl_ids && rpt_bill_tpl_ids.length > 0) || (rpt_glj_tpl_ids && rpt_glj_tpl_ids.length > 0)) {
|
|
|
console.log(1);
|
|
|
- getSummaryComboPages(user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
+ getSummaryComboPages(req, user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
let parallelFunctions = [];
|
|
|
console.log(2);
|
|
|
pri_Add_Parallel_Functions(parallelFunctions, rptPageRstArray, rpt_names, err);
|
|
|
@@ -1127,7 +1127,7 @@ module.exports = {
|
|
|
});
|
|
|
} else if ((rpt_bill_tpl_ids && rpt_bill_tpl_ids.length > 0) || (rpt_glj_tpl_ids && rpt_glj_tpl_ids.length > 0)) {
|
|
|
console.log(10);
|
|
|
- getSummaryComboPages(user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
+ getSummaryComboPages(req, user_id, prjIds, rpt_bill_tpl_ids, rpt_glj_tpl_ids, pageSize, orientation, customizeCfg, option, JV.OUTPUT_TYPE_NORMAL, function (err, rptSumPageRstArray) {
|
|
|
let parallelFunctions = [];
|
|
|
pri_Add_Parallel_Functions(parallelFunctions, rptSumPageRstArray, sum_rpt_names, err);
|
|
|
pri_Run_Parallel_Functions(parallelFunctions);
|