|
@@ -15,7 +15,7 @@ dbm.connect();
|
|
/*
|
|
/*
|
|
test('测试 - 创建dummy报表树: ', function (t) {
|
|
test('测试 - 创建dummy报表树: ', function (t) {
|
|
let tprTplTree = {};
|
|
let tprTplTree = {};
|
|
- tprTplTree.comilationId = "598d239605cdd825682925d1";
|
|
|
|
|
|
+ tprTplTree.compilationId = "598d239605cdd825682925d1";
|
|
tprTplTree.engineerId = 1;
|
|
tprTplTree.engineerId = 1;
|
|
tprTplTree.userId = -100;
|
|
tprTplTree.userId = -100;
|
|
tprTplTree.properties = [{"isZhaoBiao": false}, {"isBills": true}];
|
|
tprTplTree.properties = [{"isZhaoBiao": false}, {"isBills": true}];
|
|
@@ -39,7 +39,7 @@ test('测试 - 创建dummy报表树: ', function (t) {
|
|
/*
|
|
/*
|
|
test('测试 - 创建dummy报表树2: ', function (t) {
|
|
test('测试 - 创建dummy报表树2: ', function (t) {
|
|
let tprTplTree = {};
|
|
let tprTplTree = {};
|
|
- tprTplTree.comilationId = "598d239605cdd825682925d1";
|
|
|
|
|
|
+ tprTplTree.compilationId = "598d239605cdd825682925d1";
|
|
tprTplTree.engineerId = 2;
|
|
tprTplTree.engineerId = 2;
|
|
tprTplTree.userId = -100;
|
|
tprTplTree.userId = -100;
|
|
tprTplTree.properties = [{"isZhaoBiao": false}, {"isBills": true}];
|
|
tprTplTree.properties = [{"isZhaoBiao": false}, {"isBills": true}];
|
|
@@ -63,7 +63,7 @@ test('测试 - 创建dummy报表树2: ', function (t) {
|
|
/*
|
|
/*
|
|
test('测试 - 更新 dummy报表树2: ', function (t) {
|
|
test('测试 - 更新 dummy报表树2: ', function (t) {
|
|
let tprTplTree = {};
|
|
let tprTplTree = {};
|
|
- tprTplTree.comilationId = "598d239605cdd825682925d1";
|
|
|
|
|
|
+ tprTplTree.compilationId = "598d239605cdd825682925d1";
|
|
tprTplTree.engineerId = 2;
|
|
tprTplTree.engineerId = 2;
|
|
tprTplTree.userId = -100;
|
|
tprTplTree.userId = -100;
|
|
tprTplTree.properties = [{"isZhaoBiao": false}, {"isBills": true}];
|
|
tprTplTree.properties = [{"isZhaoBiao": false}, {"isBills": true}];
|
|
@@ -76,7 +76,7 @@ test('测试 - 更新 dummy报表树2: ', function (t) {
|
|
tprTplTree.items.push( {nodeType: 1, refId: -1, name: "【表-09】分部分项工程/施工技术措施项目清单计价表", items: null} );
|
|
tprTplTree.items.push( {nodeType: 1, refId: -1, name: "【表-09】分部分项工程/施工技术措施项目清单计价表", items: null} );
|
|
tprTplTree.items.push( {nodeType: 1, refId: -1, name: "【表-09-1】分部分项工程/施工技术措施项目清单计价表(一)", items: null} );
|
|
tprTplTree.items.push( {nodeType: 1, refId: -1, name: "【表-09-1】分部分项工程/施工技术措施项目清单计价表(一)", items: null} );
|
|
|
|
|
|
- let results = rttFacade.updateTree(tprTplTree.comilationId, tprTplTree.engineerId, tprTplTree.userId, tprTplTree);
|
|
|
|
|
|
+ let results = rttFacade.updateTree(tprTplTree.compilationId, tprTplTree.engineerId, tprTplTree.userId, tprTplTree);
|
|
results.then(function(rst) {
|
|
results.then(function(rst) {
|
|
console.log(rst);
|
|
console.log(rst);
|
|
t.pass('just pass!');
|
|
t.pass('just pass!');
|
|
@@ -124,9 +124,13 @@ test('测试 - find dummy 报表树 by ObjectId: ', function (t) {
|
|
|
|
|
|
//*
|
|
//*
|
|
test('测试 - find dummy 报表树 ', function (t) {
|
|
test('测试 - find dummy 报表树 ', function (t) {
|
|
- let results = rttFacade.findTplTree("598d239605cdd825682925d1", [1], -100);
|
|
|
|
|
|
+ let results = rttFacade.findTplTree("598d239605cdd825682925d1", [1], [-101]);
|
|
results.then(function(rst) {
|
|
results.then(function(rst) {
|
|
- console.log(rst);
|
|
|
|
|
|
+ if (rst) {
|
|
|
|
+ console.log('no result');
|
|
|
|
+ } else {
|
|
|
|
+ console.log(rst);
|
|
|
|
+ }
|
|
//mongoose.disconnect();
|
|
//mongoose.disconnect();
|
|
t.pass('just pass!');
|
|
t.pass('just pass!');
|
|
t.end();
|
|
t.end();
|