|
@@ -17,16 +17,16 @@ describe('test/app/service/report_memory.test.js', () => {
|
|
|
before(function* () {
|
|
|
const ctx = app.mockContext();
|
|
|
// 模拟登录session
|
|
|
- const postData = {
|
|
|
- account: '734406061@qq.com',
|
|
|
- project: 'T201711273363',
|
|
|
- project_password: 'mai654321',
|
|
|
- };
|
|
|
// const postData = {
|
|
|
- // account: 'chente',
|
|
|
+ // account: '734406061@qq.com',
|
|
|
// project: 'T201711273363',
|
|
|
- // project_password: '123456',
|
|
|
+ // project_password: 'mai654321',
|
|
|
// };
|
|
|
+ const postData = {
|
|
|
+ account: 'liangqibo',
|
|
|
+ project: 'P1116',
|
|
|
+ project_password: '123456',
|
|
|
+ };
|
|
|
ctx.session = {};
|
|
|
const loginResult = yield ctx.service.projectAccount.accountLogin(postData, 2);
|
|
|
assert(loginResult);
|
|
@@ -37,13 +37,16 @@ describe('test/app/service/report_memory.test.js', () => {
|
|
|
const ctx = app.mockContext(mockData);
|
|
|
|
|
|
// test12 - 第6期
|
|
|
- const stage = yield ctx.service.stage.getDataByCondition({tid: 12, order: 6});
|
|
|
+ const stage = yield ctx.service.stage.getDataByCondition({tid: 2076, order: 2});
|
|
|
const params = {
|
|
|
tender_id: stage.tid,
|
|
|
stage_id: stage.id,
|
|
|
};
|
|
|
- const filters = ['change', 'change_audit_list'];
|
|
|
- const result = yield ctx.service.report.getReportData(ctx, params, filters);
|
|
|
+ const filters = ['mem_stage_bills'];
|
|
|
+ const fields = {
|
|
|
+ mem_stage_bills: ['end_qc_tp']
|
|
|
+ };
|
|
|
+ const result = yield ctx.service.report.getReportData(params, filters, fields);
|
|
|
const savePath = path.join(ctx.app.baseDir, 'report_temp');
|
|
|
yield ctx.helper.recursiveMkdirSync(savePath);
|
|
|
for (const table in result) {
|