|
@@ -19,6 +19,7 @@ const RPT_DEF_PROPERTIES = require('../const/report_defined_properties');
|
|
|
const reportConst = require('../const/report');
|
|
|
// const stringUtil = require('../public/js/string_util_light');
|
|
|
const scheduleJob = require('node-schedule');
|
|
|
+const needCustomTables = ['mem_gather_stage_bills', 'mem_gather_deal_bills', 'mem_gather_stage_pay', 'mem_gather_tender_info', 'mem_stage_sum_bills', 'mem_stage_sum_pay'];
|
|
|
|
|
|
module.exports = app => {
|
|
|
class ReportController extends app.BaseController {
|
|
@@ -633,7 +634,6 @@ async function getAllPagesCommon(ctx, rptTpl, params, option, outputType, baseDi
|
|
|
// console.log(filter.tables);
|
|
|
const rawDataObj = await ctx.service.report.getReportData(params, filter.tables, filter.memFieldKeys,
|
|
|
rptTpl[JV.NODE_CUSTOM_DEFINE], customSelect);
|
|
|
- //await ctx.helper.saveBufferFile(JSON.stringify(rawDataObj, '', '\t'), ctx.app.baseDir + '/mem.json');
|
|
|
// console.log(rawDataObj);
|
|
|
try {
|
|
|
const printCom = JpcEx.createNew();
|
|
@@ -679,8 +679,6 @@ async function getAllPagesCommon(ctx, rptTpl, params, option, outputType, baseDi
|
|
|
}
|
|
|
|
|
|
async function getMultiRptsCommon(ctx, params, outputType, baseDir) {
|
|
|
- const needCustomTables = ['mem_gather_stage_bills', 'mem_gather_deal_bills', 'mem_gather_stage_pay', 'mem_gather_tender_info'];
|
|
|
-
|
|
|
for (let idx = 0; idx < params.rpt_ids.length; idx++) {
|
|
|
params.rpt_ids[idx] = parseInt(params.rpt_ids[idx]); // 转换一下,以防万一
|
|
|
}
|
|
@@ -767,10 +765,8 @@ async function getMultiRptsCommon(ctx, params, outputType, baseDir) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- console.log(customSelect);
|
|
|
const customRawDataObj = await ctx.service.report.getReportData(params, cfTables, cmFieldKeys,
|
|
|
rptTpl[JV.NODE_CUSTOM_DEFINE], customSelect);
|
|
|
- console.log(customRawDataObj);
|
|
|
for (const prop in customRawDataObj) {
|
|
|
curRawDataObj[prop] = customRawDataObj[prop];
|
|
|
}
|