| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 | 
							- 'use strict';
 
- /**
 
-  *
 
-  *
 
-  * @author Mai
 
-  * @date
 
-  * @version
 
-  */
 
- const { app, assert } = require('egg-mock/bootstrap');
 
- const mockData = {};
 
- const tenderId = 2076;
 
- const stageOrder = 1;
 
- const postData = {
 
-     account: 'liangqibo',
 
-     project: 'P1116',
 
-     project_password: '123456',
 
- };
 
- describe('temp_report_test.js', () => {
 
-     // 准备测试数据
 
-     before(function* () {
 
-         const ctx = app.mockContext();
 
-         // 模拟登录session
 
-         ctx.session = {};
 
-         const loginResult = yield ctx.service.projectAccount.accountLogin(postData, 2);
 
-         assert(loginResult);
 
-         mockData.session = ctx.session;
 
-     });
 
-     it('test temp', function* () {
 
-         const ctx = app.mockContext(mockData);
 
-         // test12 - 第4期
 
-         const stage = yield ctx.service.stage.getDataByCondition({tid: tenderId, order: stageOrder});
 
-         const mainData = yield ctx.service.reportMemory.getStageBillsCompareData(tenderId, stage.id, [
 
-             'id', 'tender_id', 'ledger_id', 'ledger_pid', 'level', 'order', 'full_path', 'is_leaf',
 
-             'code', 'b_code', 'name', 'unit', 'unit_price',
 
-             'deal_qty', 'deal_tp',
 
-             'sgfh_qty', 'sgfh_tp', 'sjcl_qty', 'sjcl_tp', 'qtcl_qty', 'qtcl_tp', 'quantity', 'total_price',
 
-             'dgn_qty1', 'dgn_qty2',
 
-             'drawing_code', 'memo', 'node_type', 'is_tp',
 
-             'r0_contract_qty', 'r0_contract_tp', 'r0_qc_qty', 'r0_qc_tp', 'r0_gather_qty', 'r0_gather_tp',
 
-             'r1_contract_qty', 'r1_contract_tp', 'r1_qc_qty', 'r1_qc_tp', 'r1_gather_qty', 'r1_gather_tp',
 
-             'pre_contract_qty', 'pre_contract_tp', 'pre_qc_qty', 'pre_qc_tp', 'pre_gather_qty', 'pre_gather_tp',
 
-             'chapter',
 
-         ]);
 
-         if (mainData instanceof Array) {
 
-             yield ctx.helper.saveBufferFile(JSON.stringify(mainData,"","\t"), ctx.app.baseDir + '/mem_stage_bills_compare.json');
 
-         }
 
-     });
 
- });
 
 
  |