|
@@ -25,6 +25,12 @@ describe('test/app/service/report_memory.test.js', () => {
|
|
|
// project: 'T201711273363',
|
|
|
// project_password: 'mai654321',
|
|
|
// };
|
|
|
+ ctx.session = {};
|
|
|
+ mockData.session = ctx.session;
|
|
|
+ });
|
|
|
+ // 汇总合同支付
|
|
|
+ it('test getGatherStagePay', function* () {
|
|
|
+ const ctx = app.mockContext();
|
|
|
const postData = {
|
|
|
account: 'fuqingqing',
|
|
|
project: 'P0505',
|
|
@@ -33,11 +39,7 @@ describe('test/app/service/report_memory.test.js', () => {
|
|
|
ctx.session = {};
|
|
|
const loginResult = yield ctx.service.projectAccount.accountLogin(postData, 2);
|
|
|
assert(loginResult);
|
|
|
- mockData.session = ctx.session;
|
|
|
- });
|
|
|
- // 期部位明细数据
|
|
|
- it('test getStagePos', function* () {
|
|
|
- const ctx = app.mockContext(mockData);
|
|
|
+
|
|
|
const select = {
|
|
|
tenders: [{tid: 2283}, {tid: 2281}],
|
|
|
type: 'final',
|
|
@@ -57,4 +59,32 @@ describe('test/app/service/report_memory.test.js', () => {
|
|
|
tplDefine: {gather_select: define}, cDefine: {gather_select: select}});
|
|
|
yield ctx.helper.saveBufferFile(JSON.stringify(data.mem_gather_stage_pay, "", "\t"), path.join(savePath, 'mem_gather_stage_pay_converse.json'));
|
|
|
});
|
|
|
+ // 汇总签约清单
|
|
|
+ it('test getGatherStagePay', function* () {
|
|
|
+ const ctx = app.mockContext();
|
|
|
+ const postData = {
|
|
|
+ account: 'zengpeiwen',
|
|
|
+ project: 'P1201',
|
|
|
+ project_password: '123456',
|
|
|
+ };
|
|
|
+ ctx.session = {};
|
|
|
+ const loginResult = yield ctx.service.projectAccount.accountLogin(postData, 2);
|
|
|
+ assert(loginResult);
|
|
|
+
|
|
|
+ const select = {
|
|
|
+ tenders: [{tid: 2046}, {tid: 1942}, {tid: 2217}],
|
|
|
+ type: 'final',
|
|
|
+ };
|
|
|
+ const define = {
|
|
|
+ enable: true,
|
|
|
+ setting: JSON.stringify({
|
|
|
+ title: '请选择汇总的标段',
|
|
|
+ type: 'final',
|
|
|
+ })
|
|
|
+ };
|
|
|
+
|
|
|
+ const data = {};
|
|
|
+ data.mem_gather_deal_bills = yield ctx.service.rptGatherMemory.getGatherDealBills([], define, select);
|
|
|
+ yield ctx.helper.saveBufferFile(JSON.stringify(data.mem_gather_deal_bills, "", "\t"), path.join(savePath, 'mem_gather_deal_bills.json'));
|
|
|
+ });
|
|
|
});
|