Browse Source

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/YangHuCost

vian 5 năm trước cách đây
mục cha
commit
77557edc8d

+ 2 - 2
modules/all_models/material_calc.js

@@ -53,7 +53,7 @@ var ration_glj = new Schema({
     from:{type: String,default:'std'}//std, cpt  来自标准工料机库、补充工料机库
 },{versionKey:false,_id: false});
 
-let ration_schema = {
+let ration_schema = new Schema({
     ID: {type: String},
     projectID: Number,
     code: String,
@@ -66,7 +66,7 @@ let ration_schema = {
     stdID:Number,
     from:String,
     rationAssList: [rationAssItemSchema]
-};
+},{versionKey:false,_id: false});
 
 
 let freightSchema = {

+ 1 - 1
modules/all_models/mix_ratio.js

@@ -11,7 +11,7 @@ let Schema = mongoose.Schema;
 let collectionName = 'mix_ratio';
 let modelSchema = {
     // 自增id
-    id: Number,
+    id: {type:Number,unique: true},
     // 消耗量(有别于总消耗,此字段记录配合比的消耗量)
     consumption: {
         type: String,

+ 2 - 0
modules/all_models/welcome_setting.js

@@ -15,11 +15,13 @@ let modelSchema = {
     compilationId: String,
     normal:{
       showType:{type:Number,default:0},// 1 每天一次 2 每次登录显示,0 关闭
+      showTime:Number,
       context:String
     },
     // 专业用户
     professional: {
        showType:{type:Number,default:0},// 1 每天一次 2 每次登录显示,0 关闭
+       showTime:Number,
        context:String
     }
 };

+ 21 - 0
modules/common/base/base_model.js

@@ -6,6 +6,8 @@
  * @version
  */
 import MongooseHelper from "../helper/mongoose_helper";
+let mongoose = require('mongoose');
+let counterModel =  mongoose.model('counter');
 
 class BaseModel {
 
@@ -114,6 +116,25 @@ class BaseModel {
         return result;
     }
 
+    async setIDfromCounter(name,list,map,keyfield){
+      let update = {$inc: {sequence_value: list.length}};
+      let condition = {_id: name};
+      let options = {new: true};
+    
+      // 先查找更新
+      let counter = await counterModel.findOneAndUpdate(condition, update, options);
+      let firstID = counter.sequence_value - (list.length - 1);
+      for(let a of list){
+          console.log(firstID)
+          a.id = firstID;
+          firstID+=1
+          if(map && keyfield){
+            let key = a[keyfield];
+            map[key]?map[key].push(a):map[key]=[a]
+          }
+      }
+    }
+
     /**
      * 更新数据
      *

+ 6 - 8
modules/glj/models/mix_ratio_model.js

@@ -50,9 +50,10 @@ class MixRatioModel extends BaseModel {
     async add(data) {
         let counterModel = new CounterModel();
         if (data instanceof Array) {
-            for(let tmp in data) {
+          await this.setIDfromCounter(collectionName,data);
+            /* for(let tmp in data) {
                 data[tmp].id = await counterModel.getId(collectionName);
-            }
+            } */
         } else {
             data.id = await counterModel.getId(collectionName);
         }
@@ -82,20 +83,17 @@ class MixRatioModel extends BaseModel {
     async copyNotExist(currentUnitPriceId, changeUnitPriceId,gljMap){
         let currentMap = {},targetMap = {}, insertData = [];
         //取原单价文件所有的的组成物
-        let currentList = await  this.db.find({'unit_price_file_id':currentUnitPriceId});
-        // 过滤mongoose格式
-        currentList = JSON.stringify(currentList);
-        currentList = JSON.parse(currentList);
+        let currentList = await  this.model.find({'unit_price_file_id':currentUnitPriceId}).lean();
         this.getConnectionMap(currentMap,currentList);
 
         //切换后的单价文件所有的的组成物
-        let targetList = await this.db.find({'unit_price_file_id':changeUnitPriceId});
+        let targetList = await this.model.find({'unit_price_file_id':changeUnitPriceId}).lean();
         this.getConnectionMap(targetMap,targetList);
         for(let ckey in currentMap){
             if(targetMap[ckey]){//如果切换后的单价文件已经存在,则不用复
                 continue;
             }
-            if(gljMap[ckey] && gljMap[ckey].copy  == true){//在本项目中有用到
+            if(gljMap[ckey]){//在本项目中有用到
                 for(let ratio of  currentMap[ckey]){
                     delete ratio._id;  // 删除原有id信息
                     delete ratio.id;

+ 20 - 10
modules/glj/models/unit_price_model.js

@@ -165,9 +165,10 @@ class UnitPriceModel extends BaseModel {
         let counterModel = new CounterModel();
         if (data instanceof Array) {
             // 如果是批量新增
-            for(let tmp in data) {
+           await this.setIDfromCounter(collectionName,data);
+            /* for(let tmp in data) {
                 data[tmp].id = await counterModel.getId(collectionName);
-            }
+            } */
         } else {
             data.id = await counterModel.getId(collectionName);
         }
@@ -432,7 +433,7 @@ class UnitPriceModel extends BaseModel {
             return result;
         }
 
-        let gljList = await gljListModel.find({'project_id':projectId});
+        let gljList = await gljListModel.find({'project_id':projectId}).lean();
         let gljMap = {};//用来记录glj的映射表,本项目有使用的工料机才需要copy过去
         for(let g of gljList){
             let g_index = this.getIndex(g,['code','name','specs','unit','type']);
@@ -468,10 +469,9 @@ class UnitPriceModel extends BaseModel {
                 delete tmp.id;
                 tmp.unit_price_file_id = changeUnitPriceId;
                 insertData.push(tmp);
-                gljMap[t_index].copy = true;//复制标记,用于组成物,材料计算等的复制
             }
         }
-        let uResult = insertData.length > 0 ? this.add(insertData) : true;
+        let uResult = insertData.length > 0 ? await this.add(insertData) : true;
         let mixRatioModel = new MixRatioModel();
         let mResult = await mixRatioModel.copyNotExist(currentUnitPriceId, changeUnitPriceId,gljMap);//复制组成物
         let cResult = await this.copyMaterialNotExist(currentUnitPriceId, changeUnitPriceId,gljMap);
@@ -488,10 +488,7 @@ class UnitPriceModel extends BaseModel {
     async  copyCalcNotExist(currentUnitPriceId, changeUnitPriceId,gljMap,model){
         let currentMap = {},targetMap = {}, insertData = [];
         //取原单价文件所有的原价、运费计算计录
-        let currentList = await model.find({'unit_price_file_id':currentUnitPriceId});
-        // 过滤mongoose格式
-        currentList = JSON.stringify(currentList);
-        currentList = JSON.parse(currentList);
+        let currentList = await model.find({'unit_price_file_id':currentUnitPriceId}).lean();
         currentMap = _.groupBy(currentList,"connect_key");
 
         //切换后的单价文件所有的的组成物
@@ -501,11 +498,24 @@ class UnitPriceModel extends BaseModel {
             if(targetMap[ckey]){//如果切换后已经存在,则不用复制
                 continue;
             }
-            if(gljMap[ckey] && gljMap[ckey].copy  == true){//在本项目中有用到并且复制标记为true
+            if(gljMap[ckey]){//在本项目中有用到并且复制标记为true
                 for(let c of  currentMap[ckey]){
                     delete c._id;  // 删除原有id信息
                     c.ID = uuidV1();
                     c.unit_price_file_id = changeUnitPriceId;
+                    //更改下挂的定额工料机与项目工料机的关联关系
+                    if(c.ration_gljs){
+                      for(let rg of c.ration_gljs){
+                        rg.ID = uuidV1();
+                      }
+                    }
+
+                    if(c.rations){
+                      for(let r of c.rations){
+                        r.ID = uuidV1(); 
+                      }
+                    }
+
                     insertData.push(c);
                 }
             }

+ 6 - 3
modules/main/facade/project_facade.js

@@ -20,6 +20,7 @@ let  projectsModel = mongoose.model('projects');
 let async_n = require("async");
 let _ = require('lodash');
 let ration_model = require('../models/ration');
+let optionModel = mongoose.model('options');
 let bill_model = require('../models/bills');
 let consts = require('../models/project_consts');
 let projectConsts = consts.projectConst;
@@ -288,14 +289,14 @@ async function getDefaultColSetting(libID){
     return await stdColSettingModel.findOne({ID: libID, deleted: false}, '-_id main_tree_col');
 }
 
-async function getBudgetSummayDatas(projectIDs,overWriteUrl){
+async function getBudgetSummayDatas(projectIDs,userID,compilationID,overWriteUrl){
     try {
         let projects = [];
         let names = [];
         let prjTypeNames = [];
         let compilationScopes = [];
         let decimal = null;
-        let isProgressiveType = false;
+        let isProgressiveType = true;
         for(let ID of projectIDs){
             projects.push(await getBillsByProjectID(ID)) ;
         }
@@ -312,9 +313,11 @@ async function getBudgetSummayDatas(projectIDs,overWriteUrl){
             prjTypeNames.push(projects[i].prjTypeName);
             compilationScopes.push(projects[i].compilationScope);
             decimal = await mergeProject(mp.roots,projects[i].roots);
-            if(projects[i].progressiveType == 0)  isProgressiveType = true;
         }
 
+        let options_setting = await optionModel.findOne({user_id: userID, compilation_id: compilationID}).lean();
+        if(options_setting && options_setting.options && options_setting.options.GENERALOPTS) isProgressiveType = options_setting.options.GENERALOPTS.progressiveType == 1 ?false:true; 
+
         let SummaryAuditDetail = getReportData(names,mp.roots,prjTypeNames,compilationScopes,decimal,isProgressiveType,mp.progressiveInterval,overWriteUrl);
         let parentProject = await projectsModel.findOne({ID:mp.ParentID});
         let result = {

+ 2 - 1
modules/options/models/optionTypes.js

@@ -8,7 +8,8 @@
 const optionSetting = {
     GENERALOPTS: {
         rationQuanACToBillsQuan: true,//自动根据清单工程量填写定额工程量
-        rationQuanACToRationUnit: true//自动根据定额单位转换定额工程量
+        rationQuanACToRationUnit: true,
+        progressiveType:0//累进计算费用:0 统一累进办法;1 各汇总工程相加
     },
     //色彩相关
     COLOROPTS: {

+ 2 - 1
modules/pm/controllers/pm_controller.js

@@ -322,11 +322,12 @@ module.exports = {
         let absoluteUrl = compilationData.overWriteUrl ? request.app.locals.rootDir + compilationData.overWriteUrl : request.app.locals.rootDir;
         let overWriteUrl = fs.existsSync(absoluteUrl) && fs.statSync(absoluteUrl).isFile()? compilationData.overWriteUrl : null;
         //欢迎页显示控制
-        let [isShow,context] = await pm_facade.getWelcomeInfo(sessionCompilation._id,request.session.sessionUser,request.session.compilationVersion.includes('免费'));
+        let [isShow,context,showTime] = await pm_facade.getWelcomeInfo(sessionCompilation._id,request.session.sessionUser,request.session.compilationVersion.includes('免费'));
         let renderData = {
             isFirst: isFirst,
             isShow:isShow,
             context:context,
+            showTime:showTime,
             userAccount: request.session.userAccount,
             userID: request.session.sessionUser.id,
             compilationData: JSON.stringify(sessionCompilation),

+ 27 - 2
modules/pm/facade/pm_facade.js

@@ -691,6 +691,18 @@ async function copyUnitPriceFile(newProjectID,rootProjectID,userID,originaluUnit
           for(let m of mList){
             m.unit_price_file_id = newFID;
             m.ID = uuidV1();
+            //自采自办的情况,项目工料机要跟着改变:
+            if(m.ration_gljs){
+              for(let rg of m.ration_gljs){
+                rg.ID = uuidV1();
+              }
+            }
+            if(m.rations){
+              for(let r of m.rations){
+                r.ID = uuidV1(); 
+              }
+            }
+
             rList.push(m);
           }
         }else{
@@ -1812,6 +1824,17 @@ async function importUnitPriceFiles(mainData,projectIDMap,unitPriceFileIDMap,use
             delete o._id;
             o.unit_price_file_id = fileID;
             o.ID = uuidV1();
+            if(o.ration_gljs){
+              for(let rg of o.ration_gljs){
+                rg.ID = uuidV1();
+              }
+            }
+            if(o.rations){
+              for(let r of o.rations){
+                r.ID = uuidV1();
+              }
+            }
+
             nList.push(o)
           }
         }else{
@@ -1958,14 +1981,16 @@ async function getWelcomeInfo(compilationId,sessionUser,isFree=true) {
     let welcom_setting = await welcomeModel.findOne({compilationId:compilationId});
     let isShow = false;
     let context = "";
+    let showTime = 0;
     let setting = null
     if(welcom_setting){
       setting = isFree? welcom_setting.normal:welcom_setting.professional;//区分专业版和免费版
     }
 
     if(setting){
-        if(setting.showType == 0) return [false,""];//关闭
+        if(setting.showType == 0) return [false,"",showTime];//关闭
         context = setting.context;
+        showTime = setting.showTime && setting.showTime!=""?setting.showTime:0;
         if(setting.showType == 1){//每天一次
             let dataString =moment(Date.now()).tz("Asia/Shanghai").format('YYYY-MM-DD');//今天的日期字符串
             let userInfo =await userModel.findOne({_id: mongoose.Types.ObjectId(sessionUser.id)});
@@ -1980,6 +2005,6 @@ async function getWelcomeInfo(compilationId,sessionUser,isFree=true) {
 
     }
 
-    return [isShow,context]
+    return [isShow,context,showTime]
 
 }

+ 2 - 2
modules/reports/controllers/rpt_controller.js

@@ -427,7 +427,7 @@ function getMultiRptsCommon(user_id, prj_id, rpt_ids, pageSize, orientation, cus
 
 function getBillsSummaryReportPages(req, user_id, prjIds, rpt_id, pageSize, orientation, customizeCfg, option, outputType, cb) {
     let rptTpl = null;
-    rptTplDataFacade.getBudgetSummayDatas(prjIds, req.session.sessionCompilation.overWriteUrl).then(function(summaryRawDataRst) {
+    rptTplDataFacade.getBudgetSummayDatas(prjIds, req.session.sessionUser.id, req.session.sessionCompilation._id, req.session.sessionCompilation.overWriteUrl).then(function(summaryRawDataRst) {
         rptTplFacade.getRptTemplate(rpt_id).then(function(rptTpl) {
             let rptDataUtil = new rptDataExtractor();
             rptDataUtil.initialize((rptTpl._doc)?rptTpl._doc:rptTpl);
@@ -506,7 +506,7 @@ function getSummaryComboPages(req, user_id, prjIds, billsSummaryRpt_ids, gljSumm
             }
         }
         if (billRpts.length > 0) {
-            rptTplDataFacade.getBudgetSummayDatas(prjIds, req.session.sessionCompilation.overWriteUrl).then(function(summaryRawDataRst) {
+            rptTplDataFacade.getBudgetSummayDatas(prjIds, req.session.sessionUser.id, req.session.sessionCompilation._id, req.session.sessionCompilation.overWriteUrl).then(function(summaryRawDataRst) {
                 // let savedBillsData = [];
                 try {
                     // Object.assign(savedBillsData, summaryRawDataRst.SummaryAuditDetail);

+ 2 - 2
modules/reports/facade/rpt_tpl_data_facade.js

@@ -43,8 +43,8 @@ function prepareProjectData(userId, prjId, filter, callback) {
     });
 }
 
-async function getBudgetSummayDatas(prjIds, overWriteUrl) {
-    return await projectFacade.getBudgetSummayDatas(prjIds, overWriteUrl);
+async function getBudgetSummayDatas(prjIds, userId, CompilationId, overWriteUrl) {
+    return await projectFacade.getBudgetSummayDatas(prjIds, userId, CompilationId, overWriteUrl);
 }
 
 async function getGLJSummayDatas(prjIds) {

+ 1 - 1
public/web/tree_sheet/tree_sheet_helper.js

@@ -559,7 +559,7 @@ var TREE_SHEET_HELPER = {
             };
 
             TreeNodeCellType.prototype.deactivateEditor = function (editorContext, context) {
-                    console.log("hehe")
+                    
             };
 
             TreeNodeCellType.prototype.updateEditor = function (editorContext, cellStyle, cellRect, context) {

+ 8 - 3
web/building_saas/main/js/views/options_view.js

@@ -12,7 +12,7 @@ let optionsOprObj = {
         let gOpts = me.options[me.optionsTypes.GENERALOPTS];
         if(gljUtil.isDef(gOpts)){
             for(let attr in gOpts){
-                me[attr].prop('checked', gOpts[attr]);
+              if(me[attr]) me[attr].prop('checked', gOpts[attr]);
             }
         }
     },
@@ -48,7 +48,9 @@ let optionsOprObj = {
         let v2 = this.rationQuanACToRationUnit.prop('checked');
         let orgV1 = this.getOption(this.optionsTypes.GENERALOPTS, 'rationQuanACToBillsQuan');
         let orgV2 = this.getOption(this.optionsTypes.GENERALOPTS, 'rationQuanACToRationUnit');
-        return v1 !== orgV1 || v2 !== orgV2;
+        let progressiveType = optionsOprObj.getOption(optionsOprObj.optionsTypes.GENERALOPTS, 'progressiveType');
+        let progressiveTypeVal = parseInt($("input[name='progressiveType']:checked").val())
+        return v1 !== orgV1 || v2 !== orgV2 || progressiveType!== progressiveTypeVal;
     }
 };
 
@@ -56,9 +58,12 @@ let optionsOprObj = {
 $('#poj-set').on('shown.bs.modal', function () {
     let orgV1 = optionsOprObj.getOption(optionsOprObj.optionsTypes.GENERALOPTS, 'rationQuanACToBillsQuan');
     let orgV2 = optionsOprObj.getOption(optionsOprObj.optionsTypes.GENERALOPTS, 'rationQuanACToRationUnit');
+    let progressiveType = optionsOprObj.getOption(optionsOprObj.optionsTypes.GENERALOPTS, 'progressiveType');
     optionsOprObj.rationQuanACToBillsQuan.prop('checked', orgV1);
     optionsOprObj.rationQuanACToRationUnit.prop('checked', orgV2);
-
+    progressiveType = progressiveType?progressiveType:0;
+    $('#progressive_unite').prop('checked', progressiveType == 0);
+    $('#progressive_sum').prop('checked', progressiveType == 1);
 });
 //选项移到了项目属性的系统选项中
 /*optionsOprObj.rationQuanACToBillsQuan.click(function () {

+ 4 - 11
web/building_saas/main/js/views/project_view.js

@@ -2337,15 +2337,12 @@ $('#poj-set').on('show.bs.modal', function () {
 
         let zg = projectObj.project.property.zanguCalcMode !== undefined &&
                  projectObj.project.property.zanguCalcMode !== null ? projectObj.project.property.zanguCalcMode : zanguCalcType.common;
-        let progressiveType = projectObj.project.property.progressiveType?projectObj.project.property.progressiveType:0;   
         setCalcFlag($('#rationContent'), leafBillGetFeeType.rationContent, ft);
         setCalcFlag($('#rationPriceConverse'), leafBillGetFeeType.rationPriceConverse, ft);
         setCalcFlag($('#rationPrice'), leafBillGetFeeType.rationPrice, ft);
         setCalcFlag($('#billsPrice'), leafBillGetFeeType.billsPrice, ft);
         setCalcFlag($('#zangu_common'), zanguCalcType.common, zg);
         setCalcFlag($('#zangu_gatherMaterial'), zanguCalcType.gatherMaterial, zg);
-        setCalcFlag($('#progressive_unite'), 0, progressiveType);
-        setCalcFlag($('#progressive_sum'), 1, progressiveType);
         
         let showAdjustPrice = projectObj.project.projSetting.glj_col?projectObj.project.projSetting.glj_col.showAdjustPrice:false;
         showAdjustPrice === true ? $("#tab_poj-settings-6").show():$("#tab_poj-settings-6").hide();
@@ -2505,12 +2502,6 @@ $('#property_ok').click(function () {
         reCalcRations = true;
     };
 
-    let progressiveType = parseInt($("input[name='progressiveType']:checked").val())
-    if (progressiveType !== project.property.progressiveType) {
-      properties['property.progressiveType'] = progressiveType;
-      project.property.progressiveType = progressiveType;
-  };
-
     //价差预备费,预算项目才有
     if (project.property.valuationType === 'bill') {
         let costGrowthRateV = $('#costGrowthRate').val(),
@@ -2569,10 +2560,12 @@ $('#property_ok').click(function () {
     //系统选项
     if(optionsOprObj.needToSaveGeneralOpts()){
         let v1 = optionsOprObj.rationQuanACToBillsQuan.prop('checked'),
-            v2 = optionsOprObj.rationQuanACToRationUnit.prop('checked');
+            v2 = optionsOprObj.rationQuanACToRationUnit.prop('checked'),
+            progressiveType = parseInt($("input[name='progressiveType']:checked").val());
         options.updateData = {
             rationQuanACToBillsQuan: v1,
-            rationQuanACToRationUnit: v2
+            rationQuanACToRationUnit: v2,
+            progressiveType:progressiveType
         };
     }
 

+ 3 - 1
web/building_saas/pm/html/project-management.html

@@ -682,11 +682,13 @@
         <div class="modal-content">
             <div class="modal-header">
                 <h5 class="modal-title">欢迎使用纵横公路养护云造价</h5>
-                <button type="button" class="close text-danger" data-dismiss="modal" aria-label="Close">
+                <label id="countdown" ></label>
+                <button type="button" id="welcomeCloseBtn" class="close text-danger" data-dismiss="modal" aria-label="Close">
                     <span aria-hidden="true">&times;</span>
                 </button>
             </div>
             <div class="modal-body" id="welcomeBody">
+              <input type="hidden" id="showTime" value="<%= showTime %>">
                 <div style="max-height:465px">
                      <%- context %>
                 </div>

+ 19 - 3
web/building_saas/pm/js/pm_newMain.js

@@ -3925,6 +3925,22 @@ function doAfterImport(projectDatas) {
     }
 }
 
-$(function () {
-   if(isShow)  $('#welcomePage').modal('show');//是否显示欢迎页
-});
+if(isShow){
+  let showTime = parseInt($("#showTime").val()); 
+ if(showTime > 0){
+   $("#welcomeCloseBtn").hide();
+   function countdown(){
+     if(showTime > 0){
+       showTime--
+       $("#countdown").text(showTime);
+     }else{
+       $("#countdown").text("");
+       $("#welcomeCloseBtn").show();
+       clearInterval(welcomeTimer);
+     }
+   }
+   countdown();
+   let welcomeTimer = setInterval("countdown()", 1000);   
+ }
+ $('#welcomePage').modal('show');//是否显示欢迎页
+} 

+ 13 - 3
web/building_saas/report/js/rpt_main.js

@@ -412,7 +412,9 @@ let zTreeOprObj = {
                         }
                     }
                     $("#show_project_folder").trigger("click");
-                    me.prjFolderTreeObj = $.fn.zTree.init($("#prjFolderTree"), rpt_prj_folder_setting, selectedProjects);
+                    let topItem = [{name: '所有相关项目', items: selectedProjects}];
+                    // me.prjFolderTreeObj = $.fn.zTree.init($("#prjFolderTree"), rpt_prj_folder_setting, selectedProjects);
+                    me.prjFolderTreeObj = $.fn.zTree.init($("#prjFolderTree"), rpt_prj_folder_setting, topItem);
                     me.prjFolderTreeObj.expandAll(true);
                 } else {
                     alert('error: ' + result.message);
@@ -446,6 +448,9 @@ let zTreeOprObj = {
         let me = zTreeOprObj;
         let nodes = me.prjFolderTreeObj.getCheckedNodes(true);
         if (nodes.length > 0) {
+            if (nodes[0].level === 0) {
+                nodes.splice(0, 1);
+            }
             hintBox.waitBox();
             let params = {};
             params.pageSize = rptControlObj.getCurrentPageSize();
@@ -493,6 +498,9 @@ let zTreeOprObj = {
         let me = zTreeOprObj;
         let nodes = me.prjFolderTreeObj.getCheckedNodes(true);
         if (nodes.length > 0) {
+            if (nodes[0].level === 0) {
+                nodes.splice(0, 1);
+            }
             hintBox.waitBox();
             let params = {};
             params.pageSize = rptControlObj.getCurrentPageSize();
@@ -761,8 +769,10 @@ let rptControlObj = {
         rst.prjIds = [];
         zTreeOprObj.selectedPrjIDs = [];
         for (let node of nodes) {
-            rst.prjIds.push(node.ID);
-            zTreeOprObj.selectedPrjIDs.push(node.ID);
+            if (node.level > 0) {
+                rst.prjIds.push(node.ID);
+                zTreeOprObj.selectedPrjIDs.push(node.ID);
+            }
         }
         // rst.sum_rpt_names = bill_rpt_names.concat(glj_rpt_names);
         // rst.rpt_names = rpt_names;