Kaynağa Gözat

Merge branch 'master' of http://smartcost.f3322.net:3000/SmartCost/ConstructionCost

Chenshilong 7 yıl önce
ebeveyn
işleme
776837e8cf

+ 16 - 14
modules/reports/rpt_component/helper/jpc_helper_flow_tab.js

@@ -2,33 +2,35 @@ let JV = require('../jpc_value_define');
 let JpcCommonHelper = require('./jpc_helper_common');
 
 let JpcFlowTabHelper = {
-    getMaxRowsPerPage: function(bands, rptTpl) {
+    getMaxRowsPerPage: function(bands, rptTpl, isEx) {
         let rst = 1;
-        let tab = rptTpl[JV.NODE_FLOW_INFO][JV.NODE_FLOW_CONTENT];
+        let FLOW_INFO_STR = (!isEx)?JV.NODE_FLOW_INFO:JV.NODE_FLOW_INFO_EX;
+        let tab = rptTpl[FLOW_INFO_STR][JV.NODE_FLOW_CONTENT];
         let band = bands[tab[JV.PROP_BAND_NAME]];
         if (band) {
             let maxFieldMeasure = 1.0;
             if (JV.CAL_TYPE_ABSTRACT === JpcCommonHelper.getPosCalculationType(tab[JV.PROP_CALCULATION])) {
                 let unitFactor = JpcCommonHelper.getUnitFactor(rptTpl);
-                maxFieldMeasure = 1.0 * rptTpl[JV.NODE_FLOW_INFO][JV.NODE_FLOW_CONTENT][JV.PROP_CMN_HEIGHT] * unitFactor;
+                maxFieldMeasure = 1.0 * rptTpl[FLOW_INFO_STR][JV.NODE_FLOW_CONTENT][JV.PROP_CMN_HEIGHT] * unitFactor;
             } else {
-                maxFieldMeasure = (band.Bottom - band.Top) * rptTpl[JV.NODE_FLOW_INFO][JV.NODE_FLOW_CONTENT][JV.PROP_CMN_HEIGHT] / JV.HUNDRED_PERCENT;
+                maxFieldMeasure = (band.Bottom - band.Top) * rptTpl[FLOW_INFO_STR][JV.NODE_FLOW_CONTENT][JV.PROP_CMN_HEIGHT] / JV.HUNDRED_PERCENT;
             }
             rst = Math.floor((band.Bottom - band.Top) / maxFieldMeasure);
         }
         return rst;
     },
-    getActualContentAreaHeight: function(bands, rptTpl, segments, page) {
+    getActualContentAreaHeight: function(bands, rptTpl, segments, page, isEx) {
         let rst = 1;
-        let tab = rptTpl[JV.NODE_FLOW_INFO][JV.NODE_FLOW_CONTENT];
+        let FLOW_INFO_STR = (!isEx)?JV.NODE_FLOW_INFO:JV.NODE_FLOW_INFO_EX;
+        let tab = rptTpl[FLOW_INFO_STR][JV.NODE_FLOW_CONTENT];
         let band = bands[tab[JV.PROP_BAND_NAME]];
         if (band) {
             let maxFieldMeasure = 1.0;
             if (JV.CAL_TYPE_ABSTRACT === JpcCommonHelper.getPosCalculationType(tab[JV.PROP_CALCULATION])) {
                 let unitFactor = JpcCommonHelper.getUnitFactor(rptTpl);
-                maxFieldMeasure = 1.0 * rptTpl[JV.NODE_FLOW_INFO][JV.NODE_FLOW_CONTENT][JV.PROP_CMN_HEIGHT] * unitFactor;
+                maxFieldMeasure = 1.0 * rptTpl[FLOW_INFO_STR][JV.NODE_FLOW_CONTENT][JV.PROP_CMN_HEIGHT] * unitFactor;
             } else {
-                maxFieldMeasure = (band.Bottom - band.Top) * rptTpl[JV.NODE_FLOW_INFO][JV.NODE_FLOW_CONTENT][JV.PROP_CMN_HEIGHT] / JV.HUNDRED_PERCENT;
+                maxFieldMeasure = (band.Bottom - band.Top) * rptTpl[FLOW_INFO_STR][JV.NODE_FLOW_CONTENT][JV.PROP_CMN_HEIGHT] / JV.HUNDRED_PERCENT;
             }
             if (segments.length >= page) {
                 rst = segments[page - 1].length * maxFieldMeasure;
@@ -36,17 +38,17 @@ let JpcFlowTabHelper = {
         }
         return rst;
     },
-    chkSegEnd: function (bands, rptTpl, sortedSequence, segIdx, preRec, nextRec) {
-        let me = this, rst = true;
+    chkSegEnd: function (bands, rptTpl, sortedSequence, segIdx, preRec, nextRec, isEx) {
+        let me = this;
         let remainAmt = preRec + nextRec - sortedSequence[segIdx].length;
-        rst = me.hasEnoughSpace(rptTpl, bands, remainAmt);
-        return rst;
+        return me.hasEnoughSpace(rptTpl, bands, remainAmt, isEx);
     },
-    hasEnoughSpace: function (rptTpl, bands, remainAmt) {
+    hasEnoughSpace: function (rptTpl, bands, remainAmt, isEx) {
         if (remainAmt < 0) return false;
         let rst = true, measurement = 1.0, douDiffForCompare = 0.00001;
         let unitFactor = JpcCommonHelper.getUnitFactor(rptTpl);
-        let tab = rptTpl[JV.NODE_FLOW_INFO][JV.NODE_FLOW_CONTENT];
+        let FLOW_INFO_STR = (!isEx)?JV.NODE_FLOW_INFO:JV.NODE_FLOW_INFO_EX;
+        let tab = rptTpl[FLOW_INFO_STR][JV.NODE_FLOW_CONTENT];
         let band = bands[tab[JV.PROP_BAND_NAME]];
         if (band !== null && band !== undefined) {
             measurement = 1.0 * tab[JV.PROP_CMN_HEIGHT] * unitFactor;

+ 4 - 3
modules/reports/rpt_component/jpc_data.js

@@ -1,4 +1,5 @@
 let JV = require('./jpc_value_define');
+let jpc_common_helper = require("./helper/jpc_helper_common");
 let JpcData = {
     createNew: function() {
         let JpcDataRst = {};
@@ -11,14 +12,14 @@ let JpcData = {
                 let masterIDs = [];
                 for (let i = 0; i < rptTpl[JV.NODE_FIELD_MAP][MASTER_FIELD_STR].length; i++) {
                     let mstFieldObj = rptTpl[JV.NODE_FIELD_MAP][MASTER_FIELD_STR][i];
-                    if ((mstFieldObj[JV.PROP_IS_ID]) && (mstFieldObj[JV.PROP_IS_ID] === 'T')) {
+                    if (jpc_common_helper.getBoolean(mstFieldObj[JV.PROP_IS_ID])) {
                         masterIDs.push({"idx": i, "seq": mstFieldObj[JV.PROP_ID_SEQ]});
                     }
                 }
                 let detailIDs = [];
                 for (let i = 0; i < rptTpl[JV.NODE_FIELD_MAP][DETAIL_FIELD_STR].length; i++) {
                     let dtlFieldObj = rptTpl[JV.NODE_FIELD_MAP][DETAIL_FIELD_STR][i];
-                    if ((dtlFieldObj[JV.PROP_IS_ID]) && (dtlFieldObj[JV.PROP_IS_ID] === 'T')) {
+                    if (jpc_common_helper.getBoolean(dtlFieldObj[JV.PROP_IS_ID])) {
                         detailIDs.push({"idx": i, "seq": dtlFieldObj[JV.PROP_ID_SEQ]});
                     }
                 }
@@ -100,6 +101,6 @@ let JpcData = {
         };
         return JpcDataRst;
     }
-}
+};
 
 module.exports = JpcData;

+ 9 - 0
modules/reports/rpt_component/jpc_ex.js

@@ -85,10 +85,14 @@ JpcExSrv.prototype.createNew = function(){
         if (rptTpl[JV.NODE_FLOW_INFO]) {
             me.flowTab = JpcFlowTab.createNew();
             me.flowTab.initialize(false);
+            me.isFollowMode = false;
         }
         if (rptTpl[JV.NODE_FLOW_INFO_EX]) {
             me.flowTabEx = JpcFlowTab.createNew();
             me.flowTabEx.initialize(true);
+            if (rptTpl[JV.NODE_FLOW_INFO_EX][JV.PROP_FLOW_EX_DISPLAY_MODE] === JV.DISPLAY_MODE_FOLLOW) {
+                me.isFollowMode = true;
+            }
         }
         if (rptTpl[JV.NODE_BILL_INFO]) {
             me.billTab = JpcBillTab.createNew();
@@ -137,6 +141,11 @@ JpcExSrv.prototype.createNew = function(){
     JpcResult.paging = function(rptTpl, dataObj, defProperties, option) {
         let me = this, dftPagingOption = option||JV.PAGING_OPTION_NORMAL;
         if (me.flowTab) {
+            if (me.isFollowMode) {
+                //
+            } else {
+                //
+            }
             me.totalPages = me.flowTab.preSetupPages(rptTpl, dataObj, defProperties, dftPagingOption);
             if (me.flowTabEx) {
                 me.exTotalPages = me.flowTabEx.preSetupPages(rptTpl, dataObj, defProperties, dftPagingOption);

+ 3 - 3
modules/reports/rpt_component/jpc_flow_tab.js

@@ -104,7 +104,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
             }
             function private_resetBandArea() {
                 JpcBandHelper.setBandArea(bands, rptTpl, pageStatus, !me.isEx, me.isEx);
-                maxRowRec = JpcFlowTabHelper.getMaxRowsPerPage(bands, rptTpl);
+                maxRowRec = JpcFlowTabHelper.getMaxRowsPerPage(bands, rptTpl, me.isEx);
             }
             for (let segIdx = 0; segIdx < me.segments.length; segIdx++) {
                 private_resetBandArea();
@@ -112,7 +112,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
                 let rowSplitCnt = Math.ceil(1.0 * me.segments[segIdx].length / orgMaxRowRec);
                 pageStatus[JV.STATUS_SEGMENT_END] = true;
                 private_resetBandArea();
-                let hasAdHocRow = !JpcFlowTabHelper.chkSegEnd(bands, rptTpl, me.segments, segIdx, (rowSplitCnt - 1) * orgMaxRowRec, maxRowRec);
+                let hasAdHocRow = !JpcFlowTabHelper.chkSegEnd(bands, rptTpl, me.segments, segIdx, (rowSplitCnt - 1) * orgMaxRowRec, maxRowRec, me.isEx);
                 if (hasAdHocRow) rowSplitCnt++;
                 if (rowSplitCnt % me.multiCols > 0) {
                     rowSplitCnt++
@@ -145,7 +145,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
             //2. then reset the band height
             let tab = rptTpl[JV.NODE_FLOW_INFO][JV.NODE_FLOW_CONTENT];
             let flowContentBand = bands[tab[JV.PROP_BAND_NAME]];
-            let actH = JpcFlowTabHelper.getActualContentAreaHeight(bands, rptTpl, me.segments, page);
+            let actH = JpcFlowTabHelper.getActualContentAreaHeight(bands, rptTpl, me.segments, page, me.isEx);
             let offsetY = actH - (flowContentBand.Bottom - flowContentBand.Top);
             JpcBandHelper.resetBandPos(rptTpl[JV.NODE_BAND_COLLECTION], bands, flowContentBand, 0, offsetY);
             // 2.1 Content-Tab

+ 28 - 3
modules/reports/rpt_component/jpc_rte.js

@@ -46,15 +46,40 @@ let JE = {
         }
         return rst;
     },
-    setFieldValue: function (field, newValue, dataObj, valIdx) {
-        if (!(field.DataNodeName)) {
+    setFieldValue: function (field, dataObj, valIdx, newValue) {
+        if (field.DataNodeName === "NA") {
+            if (!field[JV.PROP_AD_HOC_DATA]) {
+                field[JV.PROP_AD_HOC_DATA] = [];
+            }
+            field[JV.PROP_AD_HOC_DATA][valIdx] = newValue;
+        } else if (!field.DataNodeName) {
+            //that means this is a self-defined discrete field!
+            field.DataNodeName = JV.DATA_DISCRETE_DATA;
+            let len = dataObj[JV.DATA_DISCRETE_DATA].length;
+            field.DataSeq = len;
+            dataObj[JV.DATA_DISCRETE_DATA].push([]);
+            dataObj[field.DataNodeName][field.DataSeq][valIdx] = newValue;
+        } else {
+            dataObj[field.DataNodeName][field.DataSeq][valIdx] = newValue;
+        }
+    },
+    getFieldValue: function (field, dataObj, valIdx, dftVal) {
+        let rst = dftVal;
+        if (!field.DataNodeName) {
             //that means this is a self-defined discrete field!
             field.DataNodeName = JV.DATA_DISCRETE_DATA;
             let len = dataObj[JV.DATA_DISCRETE_DATA];
             field.DataSeq = len;
             dataObj[JV.DATA_DISCRETE_DATA].push([]);
         }
-        dataObj[field.DataNodeName][field.DataSeq][valIdx] = newValue;
+        if (dataObj[field.DataNodeName][field.DataSeq].length > valIdx) {
+            rst = dataObj[field.DataNodeName][field.DataSeq][valIdx];
+        } else {
+            if (dftVal === null && dataObj[field.DataNodeName][field.DataSeq].length > 0) {
+                rst = dataObj[field.DataNodeName][field.DataSeq][dataObj[field.DataNodeName][field.DataSeq].length - 1];
+            }
+        }
+        return rst;
     }
 }
 

+ 112 - 2
modules/reports/util/rpt_construct_data_util.js

@@ -161,8 +161,8 @@ class Rpt_Data_Extractor {
         // console.log(JV.DATA_MASTER_DATA_EX);
         // console.log(rptDataObj[JV.DATA_MASTER_DATA_EX]);
         assembleFields(tpl[JV.NODE_FIELD_MAP][JV.NODE_DETAIL_FIELDS_EX], rptDataObj[JV.DATA_DETAIL_DATA_EX], $PROJECT);
-        console.log(JV.DATA_DETAIL_DATA_EX);
-        console.log(rptDataObj[JV.DATA_DETAIL_DATA_EX]);
+        // console.log(JV.DATA_DETAIL_DATA_EX);
+        // console.log(rptDataObj[JV.DATA_DETAIL_DATA_EX]);
         return rptDataObj;
     };
 
@@ -340,10 +340,18 @@ function sortData(sourceData, sortCfg) {
 
 function setupFunc(obj, prop, ownRawObj) {
     obj[prop] = {};
+    // if (prop === projectConst.CALC_PROGRAM) {
+    //     obj[prop]["myOwnRawDataObj"] = ownRawObj.data;
+    // } else {
+    //     obj[prop]["myOwnRawDataObj"] = ownRawObj;
+    // }
     obj[prop]["myOwnRawDataObj"] = ownRawObj;
     obj[prop].getProperty = ext_getPropety;
     obj[prop].getFee = ext_getFee;
     obj[prop].getPropertyByForeignId = ext_getPropertyByForeignId;
+    obj[prop].getArrayItemByKey = ext_getArrayItemByKey;
+    if (prop === projectConst.CALC_PROGRAM) obj[prop].getCalcProperty = ext_getCalcProperty;
+    if (prop === projectConst.FEERATE) obj[prop].getFeeRate = ext_getFeeRate;
 }
 
 function assembleFields(fieldList, rstDataArr, $PROJECT) {
@@ -449,6 +457,103 @@ function ext_getFee(feeKey, dtlFeeKey) {
     return rst;
 }
 
+function ext_getCalcProperty(templateIDs, calcItemKey, calcItemKeyVal, calcItemRstKey){
+    let rst = [], parentObj = this; //this should be "calc_program" object
+    let dtObj = parentObj["myOwnRawDataObj"];
+    let optimizeObj = {};
+    let private_getProperty = function (cId) {
+        let calcTplObj = optimizeObj["calc_program_" + cId];
+        if (!calcTplObj) {
+            let templates = (dtObj.data._doc)?dtObj.data._doc.templates:dtObj.data.templates;
+            for (let tpl of templates) {
+                if (cId === tpl.ID) {
+                    optimizeObj["calc_program_" + cId] = tpl;
+                    calcTplObj = tpl;
+                    break;
+                }
+            }
+        }
+        if (calcTplObj) {
+            for (let calcItem of calcTplObj.calcItems) {
+                if (calcItem[calcItemKey] === calcItemKeyVal) {
+                    rst.push(calcItem[calcItemRstKey]);
+                    break;
+                }
+            }
+        }
+    };
+    if (templateIDs instanceof Array) {
+        for (let tplId of templateIDs) {
+            private_getProperty(tplId);
+        }
+    } else {
+        private_getProperty(templateIDs);
+    }
+    optimizeObj = null;
+    return rst;
+}
+
+function ext_getFeeRate(fee_Ids){
+    let rst = [], parentObj = this; //this should be "feeRate" object
+    let dtObj = parentObj["myOwnRawDataObj"];
+    let optimizeObj = {};
+    let private_getFeeRate = function (fId) {
+        let feeRateItemObj = optimizeObj["fee_rates_" + fId];
+        if (!feeRateItemObj) {
+            let rates = (dtObj.data._doc)?dtObj.data._doc.rates:dtObj.data.rates;
+            for (let feeItem of rates) {
+                if (fId === feeItem.ID) {
+                    optimizeObj["fee_rates_" + fId] = feeItem;
+                    feeRateItemObj = feeItem;
+                    break;
+                }
+            }
+        }
+        if (feeRateItemObj) {
+            rst.push(feeRateItemObj.rate);
+        } else {
+            rst.push(0);
+        }
+    };
+    if (fee_Ids instanceof Array) {
+        for (let fId of fee_Ids) {
+            private_getFeeRate(fId);
+        }
+    } else {
+        private_getFeeRate(fee_Ids);
+    }
+    optimizeObj = null;
+    return rst;
+}
+
+function ext_getArrayItemByKey(arrayKey, itemKey, itemKeyValue, itemRstKey){
+    let rst = [], parentObj = this;
+    let dtObj = parentObj["myOwnRawDataObj"];
+    let private_getItemValue = function (arr, dtlItKV) {
+        for (let item of arr) {
+            if (item[itemKey] === dtlItKV) {
+                if (itemRstKey) {
+                    rst.push(item[itemRstKey]);
+                } else {
+                    rst.push(item);
+                }
+                break;
+            }
+        }
+    };
+    let arr = dtObj[arrayKey];
+    if (arr && arr instanceof Array) {
+        if (itemKeyValue instanceof Array) {
+            for (let dtlItemKeyVal of itemKeyValue) {
+                private_getItemValue(arr, dtlItemKeyVal);
+            }
+        } else {
+            private_getItemValue(arr, itemKeyValue);
+        }
+    }
+
+}
+
 function ext_getPropertyByForeignId(foreignIdVal, adHocIdKey, propKey) {
     let rst = [], parentObj = this;
     let IdKey = (adHocIdKey)?adHocIdKey:"ID";
@@ -468,6 +573,11 @@ function ext_getPropertyByForeignId(foreignIdVal, adHocIdKey, propKey) {
                                 if (i === 0) {
                                     rstP = item[splitPKey[i]];
                                 } else {
+                                    if (splitPKey[i].indexOf("[") === 0 && splitPKey[i].indexOf("]") === (splitPKey[i].length - 1)) {
+                                        //考虑数组情况^_^!!!
+                                    } else {
+                                        //
+                                    }
                                     rstP = rstP[splitPKey[i]];
                                 }
                             }

+ 42 - 42
public/stringUtil.js

@@ -1,5 +1,5 @@
-var pinyin = (function (){
-    var Pinyin = function (ops){
+let pinyin = (function (){
+    let Pinyin = function (ops){
             this.initialize(ops);
         },
 
@@ -23,10 +23,10 @@ var pinyin = (function (){
 
         // 提取拼音, 返回首字母大写形式
         getFullChars: function(str){
-            var result = '', name;
-            var reg = new RegExp('[a-zA-Z0-9\- ]');
-            for (var i=0, len = str.length; i < len; i++){
-                var ch = str.substr(i,1), unicode = ch.charCodeAt(0);
+            let result = '', name;
+            let reg = new RegExp('[a-zA-Z0-9\- ]');
+            for (let i=0, len = str.length; i < len; i++){
+                let ch = str.substr(i,1), unicode = ch.charCodeAt(0);
                 if(unicode > 40869 || unicode < 19968){
                     result += ch;
                 }else{
@@ -43,10 +43,10 @@ var pinyin = (function (){
         getCamelChars: function(str){
             if(typeof(str) !== 'string')
                 throw new Error(-1, "函数getFisrt需要字符串类型参数!");
-            var chars = []; //保存中间结果的数组
-            for(var i=0,len=str.length; i < len; i++){
+            let chars = []; //保存中间结果的数组
+            for(let i=0,len=str.length; i < len; i++){
                 //获得unicode码
-                var ch = str.charAt(i);
+                let ch = str.charAt(i);
                 //检查该unicode码是否在处理范围之内,在则返回该码对映汉字的拼音首字母,不在则调用其它函数处理
                 chars.push(this._getChar(ch));
             }
@@ -57,9 +57,9 @@ var pinyin = (function (){
 
         // 提取拼音
         _getFullChar: function(str){
-            for (var key in this.full_dict){
+            for (let key in this.full_dict){
                 if(-1 !== this.full_dict[key].indexOf(str)){
-                    return this._capitalize(key); break;
+                    return this._capitalize(key);
                 }
             }
             return false;
@@ -68,14 +68,14 @@ var pinyin = (function (){
         // 首字母大写
         _capitalize: function(str){
             if(str.length>0){
-                var first = str.substr(0,1).toUpperCase();
-                var spare = str.substr(1,str.length);
+                let first = str.substr(0,1).toUpperCase();
+                let spare = str.substr(1,str.length);
                 return first + spare;
             }
         },
 
         _getChar: function(ch){
-            var unicode = ch.charCodeAt(0);
+            let unicode = ch.charCodeAt(0);
             //如果不在汉字处理范围之内,返回原字符,也可以调用自己的处理函数
             if(unicode > 40869 || unicode < 19968)
                 return ch; //dealWithOthers(ch);
@@ -88,21 +88,21 @@ var pinyin = (function (){
         _getResult: function(chars){
             if(!this.options.checkPolyphone)
                 return chars.join('');
-            var result = [''];
-            for(var i=0,len=chars.length;i<len;i++){
-                var str = chars[i], strlen = str.length;
+            let result = [''];
+            for(let i=0,len=chars.length;i<len;i++){
+                let str = chars[i], strlen = str.length;
                 if(strlen == 1){
-                    for(var j=0; j < result.length; j++){
+                    for(let j=0; j < result.length; j++){
                         result[k] += str;
                     }
                 }else{
-                    var swap1 = result.slice(0);
+                    let swap1 = result.slice(0);
                     result = [];
-                    for(var j=0; j < strlen; j++){
+                    for(let j=0; j < strlen; j++){
                         //复制一个相同的arrRslt
-                        var swap2 = swap1.slice(0);
+                        let swap2 = swap1.slice(0);
                         //把当前字符str[k]添加到每个元素末尾
-                        for(var k=0; k < swap2.length; k++){
+                        for(let k=0; k < swap2.length; k++){
                             swap2[k] += str.charAt(j);
                         }
                         //把复制并修改后的数组连接到arrRslt上
@@ -115,8 +115,8 @@ var pinyin = (function (){
 
     };
 
-    var extend = function(dst, src){
-        for(var property in src){
+    let extend = function(dst, src){
+        for(let property in src){
             dst[property] = src[property];
         }
         return dst;
@@ -127,51 +127,51 @@ var pinyin = (function (){
 
 module.exports = {
     isEmptyString: function(str) {
-        var rst = false;
-        if (str == null || str == undefined) {
+        let rst = false;
+        if (str === null || str === undefined) {
             rst = true;
         } else if (typeof str) {
-            var reg = /^\s*$/;
+            let reg = /^\s*$/;
             rst = reg.test(str);
         }
         return rst;
     },
     convertNumToChinese : function(num, isCurrency) {
         if (!/^\d*(\.\d*)?$/.test(num)) { return "Number is wrong!"; }
-        var AA, BB;
+        let AA, BB;
         if (isCurrency) {
-            AA = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖");
-            BB = new Array("", "拾", "佰", "仟", "萬", "億", "点", "");
+            AA = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"];
+            BB = ["", "拾", "佰", "仟", "萬", "億", "点", ""];
         } else {
             AA = ['零','一','二','三','四','五','六','七','八','九'];
-            BB = new Array("", "十", "百", "千", "万", "亿", "点", "");
+            BB = ["", "十", "百", "千", "万", "亿", "点", ""];
         }
-        //var AA = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖");
-        //var BB = new Array("", "拾", "佰", "仟", "萬", "億", "点", "");
-        var a = ("" + num).replace(/(^0*)/g, "").split("."), k = 0, re = "";
-        for (var i = a[0].length - 1; i >= 0; i--) {
+        //let AA = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖");
+        //let BB = new Array("", "拾", "佰", "仟", "萬", "億", "点", "");
+        let a = ("" + num).replace(/(^0*)/g, "").split("."), k = 0, re = "";
+        for (let i = a[0].length - 1; i >= 0; i--) {
             switch (k) {
                 case 0: re = BB[7] + re; break;
                 case 4: if (!new RegExp("0{4}\\d{" + (a[0].length - i - 1) + "}$").test(a[0]))
                     re = BB[4] + re; break;
                 case 8: re = BB[5] + re; BB[7] = BB[5]; k = 0; break;
             }
-            if (k % 4 == 2 && a[0].charAt(i + 2) != 0 && a[0].charAt(i + 1) == 0) re = AA[0] + re;
-            if (a[0].charAt(i) != 0) re = AA[a[0].charAt(i)] + BB[k % 4] + re; k++;
+            if (k % 4 === 2 && a[0].charAt(i + 2) !== 0 && a[0].charAt(i + 1) === 0) re = AA[0] + re;
+            if (a[0].charAt(i) !== 0) re = AA[a[0].charAt(i)] + BB[k % 4] + re; k++;
         }
 
         if (a.length > 1) //加上小数部分(如果有小数部分)
         {
             re += BB[6];
-            for (var i = 0; i < a[1].length; i++) re += AA[a[1].charAt(i)];
+            for (let i = 0; i < a[1].length; i++) re += AA[a[1].charAt(i)];
         }
         return re;
     },
     convertStrToBoolean: function(str) {
-        var rst = false, me = this;
+        let rst = false, me = this;
         if (!me.isEmptyString(str)) {
-            var upperStr = str.toUpperCase();
-            if (upperStr == 'T' || upperStr == 'Y' || upperStr == 'YES' || upperStr == 'TRUE') {
+            let upperStr = str.toUpperCase();
+            if (upperStr === 'T' || upperStr === 'Y' || upperStr === 'YES' || upperStr === 'TRUE') {
                 rst = true;
             }
         }
@@ -183,4 +183,4 @@ module.exports = {
     getPinYinCamelChars: function(value) {
         return pinyin.getCamelChars(value);
     }
-}
+};

+ 7 - 7
public/web/string_util_light.js

@@ -5,23 +5,23 @@
 
 let stringUtil = {
     isEmptyString: function(str) {
-        var rst = false;
-        if (str == null || str == undefined) {
+        let rst = false;
+        if (str === null || str === undefined) {
             rst = true;
         } else if (typeof str) {
-            var reg = /^\s*$/;
+            let reg = /^\s*$/;
             rst = reg.test(str);
         }
         return rst;
     },
     convertStrToBoolean: function(str) {
-        var rst = false, me = this;
+        let rst = false, me = this;
         if (!me.isEmptyString(str)) {
-            var upperStr = str.toUpperCase();
-            if (upperStr == 'T' || upperStr == 'Y' || upperStr == 'YES' || upperStr == 'TRUE') {
+            let upperStr = str.toUpperCase();
+            if (upperStr === 'T' || upperStr === 'Y' || upperStr === 'YES' || upperStr === 'TRUE') {
                 rst = true;
             }
         }
         return rst;
     }
-}
+};

+ 10 - 3
test/unit/reports/test_tpl_09_1.js

@@ -38,8 +38,13 @@ let projectDataMdl = require('../../../modules/main/models/project');
 let demoPrjId = - 1;
 let demoRptId = 226, pagesize = "A4";
 
-demoPrjId = 610; //QA: 建筑工程
 let userId_Leng = 1142; //小冷User Id
+demoPrjId = 720; //QA: DW3
+/*/
+let userId_Dft = userId_Leng;
+/*/
+let userId_Dft = 76075;
+//*/
 
 let rptTplFacade = require("../../../modules/reports/facade/rpt_template_facade");
 let rptTplDataFacade = require("../../../modules/reports/facade/rpt_tpl_data_facade");
@@ -73,8 +78,10 @@ test('测试 - 获取project部分数据: ', function (t) {
     filter.push(projectConsts.BILLS);
     filter.push(projectConsts.RATION);
     filter.push(projectConsts.RATION_GLJ);
+    filter.push(projectConsts.PROJECTGLJ);
     filter.push(projectConsts.FEERATE);
-    prjMdl.project.getUserProject(userId_Leng, demoPrjId, function(err, msg, prjObj){
+    filter.push(projectConsts.CALC_PROGRAM);
+    prjMdl.project.getUserProject(userId_Dft, demoPrjId, function(err, msg, prjObj){
         if (!err) {
             projectDataMdl.getFilterData(demoPrjId, filter, function (results) {
                 if (results) {
@@ -109,7 +116,7 @@ test('测试 - 测试模板啦: ', function (t) {
         let filter = rptDataUtil.getDataRequestFilter();
         console.log(filter);
         //正常应该根据报表模板定义的数据类型来请求数据
-        rptTplDataFacade.prepareProjectData(userId_Leng, demoPrjId, filter, function (err, msg, rawDataObj) {
+        rptTplDataFacade.prepareProjectData(userId_Dft, demoPrjId, filter, function (err, msg, rawDataObj) {
             if (!err) {
                 let tplData = rptDataUtil.assembleData(rawDataObj);
                 // fsUtil.wirteObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataObject.js");

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 18062
tmp/07_1.page.js


+ 0 - 14
tmp/excel_test_raw_data/08-2/[Content_Types].xml

@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
-	<Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>
-	<Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>
-	<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
-	<Default Extension="xml" ContentType="application/xml"/>
-	<Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>
-	<Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>
-	<Override PartName="/xl/worksheets/sheet2.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>
-	<Override PartName="/xl/worksheets/sheet3.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>
-	<Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>
-	<Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/>
-	<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
-</Types>

+ 0 - 6
tmp/excel_test_raw_data/08-2/_rels/.rels

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
-	<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
-	<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
-	<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>
-</Relationships>

+ 0 - 26
tmp/excel_test_raw_data/08-2/docProps/app.xml

@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
-	<Application>Microsoft Excel</Application>
-	<DocSecurity>0</DocSecurity>
-	<ScaleCrop>false</ScaleCrop>
-	<HeadingPairs>
-		<vt:vector size="2" baseType="variant">
-			<vt:variant>
-				<vt:lpstr>工作表</vt:lpstr>
-			</vt:variant>
-			<vt:variant>
-				<vt:i4>1</vt:i4>
-			</vt:variant>
-		</vt:vector>
-	</HeadingPairs>
-	<TitlesOfParts>
-		<vt:vector size="1" baseType="lpstr">
-			<vt:lpstr>第1页</vt:lpstr>
-		</vt:vector>
-	</TitlesOfParts>
-	<Company>OOCL</Company>
-	<LinksUpToDate>false</LinksUpToDate>
-	<SharedDoc>false</SharedDoc>
-	<HyperlinksChanged>false</HyperlinksChanged>
-	<AppVersion>12.0000</AppVersion>
-</Properties>

+ 0 - 7
tmp/excel_test_raw_data/08-2/docProps/core.xml

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<dc:creator>Tony</dc:creator>
-	<cp:lastModifiedBy>Tony</cp:lastModifiedBy>
-	<dcterms:created xsi:type="dcterms:W3CDTF">2011-05-14T09:11:44Z</dcterms:created>
-	<dcterms:modified xsi:type="dcterms:W3CDTF">2017-03-31T02:23:46Z</dcterms:modified>
-</cp:coreProperties>

+ 0 - 7
tmp/excel_test_raw_data/08-2/xl/_rels/workbook.xml.rels

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
-    <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />
-    <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml" />
-    <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml" />
-    <Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />
-</Relationships>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 17365
tmp/excel_test_raw_data/08-2/xl/sharedStrings.xml


+ 0 - 205
tmp/excel_test_raw_data/08-2/xl/styles.xml

@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
-	<fonts count="6">
-		<font>
-			<sz val="11"/>
-			<color theme="1"/>
-			<name val="宋体"/>
-			<charset val="134"/>
-			<scheme val="minor"/>
-		</font>
-		<font>
-			<sz val="9"/>
-			<name val="宋体"/>
-			<charset val="134"/>
-		</font>
-		<font>
-			<b/>
-			<sz val="20"/>
-			<color indexed="8"/>
-			<name val="smartSimSun"/>
-			<charset val="134"/>
-		</font>
-		<font>
-			<sz val="9"/>
-			<color indexed="8"/>
-			<name val="smartSimSun"/>
-			<charset val="134"/>
-		</font>
-		<font>
-			<sz val="9"/>
-			<color indexed="8"/>
-			<name val="宋体"/>
-			<charset val="134"/>
-		</font>
-		<font>
-			<sz val="12"/>
-			<color indexed="8"/>
-			<name val="宋体"/>
-			<charset val="134"/>
-		</font>
-	</fonts>
-	<fills count="2">
-		<fill>
-			<patternFill patternType="none"/>
-		</fill>
-		<fill>
-			<patternFill patternType="gray125"/>
-		</fill>
-	</fills>
-	<borders count="6">
-		<border>
-			<left/>
-			<right/>
-			<top/>
-			<bottom/>
-			<diagonal/>
-		</border>
-		<border>
-			<left/>
-			<right style="thin">
-				<color indexed="8"/>
-			</right>
-			<top style="thin">
-				<color indexed="8"/>
-			</top>
-			<bottom style="thin">
-				<color indexed="8"/>
-			</bottom>
-			<diagonal/>
-		</border>
-		<border>
-			<left style="thin">
-				<color indexed="8"/>
-			</left>
-			<right style="thin">
-				<color indexed="8"/>
-			</right>
-			<top style="thin">
-				<color indexed="8"/>
-			</top>
-			<bottom style="thin">
-				<color indexed="8"/>
-			</bottom>
-			<diagonal/>
-		</border>
-		<border>
-			<left style="thin">
-				<color indexed="8"/>
-			</left>
-			<right/>
-			<top style="thin">
-				<color indexed="8"/>
-			</top>
-			<bottom style="thin">
-				<color indexed="8"/>
-			</bottom>
-			<diagonal/>
-		</border>
-		<border>
-			<left style="thin">
-				<color indexed="8"/>
-			</left>
-			<right/>
-			<top style="thin">
-				<color indexed="8"/>
-			</top>
-			<bottom/>
-			<diagonal/>
-		</border>
-		<border>
-			<left style="thin">
-				<color indexed="8"/>
-			</left>
-			<right/>
-			<top/>
-			<bottom/>
-			<diagonal/>
-		</border>
-	</borders>
-	<cellStyleXfs count="1">
-		<xf numFmtId="0" fontId="0" fillId="0" borderId="0">
-			<alignment vertical="center"/>
-		</xf>
-	</cellStyleXfs>
-	<cellXfs count="19">
-		<xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0">
-			<alignment vertical="center"/>
-		</xf>
-		<xf numFmtId="0" fontId="2" fillId="0" borderId="0" xfId="0" applyFont="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="center" vertical="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="0" xfId="0" applyFont="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="left" vertical="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="1" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="center" vertical="center" wrapText="1" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="2" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="center" vertical="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="2" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="left" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="2" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="2" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="right" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="3" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="center" vertical="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="4" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="center" vertical="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="5" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="center" vertical="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="1" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="3" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="right" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="4" fillId="0" borderId="0" xfId="0" applyFont="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="left" vertical="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="1" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="center" vertical="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="5" fillId="0" borderId="2" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="center" vertical="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="5" fillId="0" borderId="3" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="center" vertical="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="2" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="right" vertical="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-		<xf numFmtId="0" fontId="3" fillId="0" borderId="3" xfId="0" applyFont="1" applyBorder="1" applyAlignment="1" applyProtection="1">
-			<alignment horizontal="right" vertical="center" shrinkToFit="1"/>
-			<protection locked="0"/>
-		</xf>
-	</cellXfs>
-	<cellStyles count="1"><cellStyle name="常规" xfId="0" builtinId="0"/></cellStyles>
-	<dxfs count="0"/>
-	<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleLight16"/>
-</styleSheet>

+ 0 - 281
tmp/excel_test_raw_data/08-2/xl/theme/theme1.xml

@@ -1,281 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office 主题">
-    <a:themeElements>
-        <a:clrScheme name="Office">
-            <a:dk1>
-                <a:sysClr val="windowText" lastClr="000000" />
-            </a:dk1>
-            <a:lt1>
-                <a:sysClr val="window" lastClr="FFFFFF" />
-            </a:lt1>
-            <a:dk2>
-                <a:srgbClr val="1F497D" />
-            </a:dk2>
-            <a:lt2>
-                <a:srgbClr val="EEECE1" />
-            </a:lt2>
-            <a:accent1>
-                <a:srgbClr val="4F81BD" />
-            </a:accent1>
-            <a:accent2>
-                <a:srgbClr val="C0504D" />
-            </a:accent2>
-            <a:accent3>
-                <a:srgbClr val="9BBB59" />
-            </a:accent3>
-            <a:accent4>
-                <a:srgbClr val="8064A2" />
-            </a:accent4>
-            <a:accent5>
-                <a:srgbClr val="4BACC6" />
-            </a:accent5>
-            <a:accent6>
-                <a:srgbClr val="F79646" />
-            </a:accent6>
-            <a:hlink>
-                <a:srgbClr val="0000FF" />
-            </a:hlink>
-            <a:folHlink>
-                <a:srgbClr val="800080" />
-            </a:folHlink>
-        </a:clrScheme>
-        <a:fontScheme name="Office">
-            <a:majorFont>
-                <a:latin typeface="Cambria" />
-                <a:ea typeface="" />
-                <a:cs typeface="" />
-                <a:font script="Jpan" typeface="MS Pゴシック" />
-                <a:font script="Hang" typeface="맑은 고딕" />
-                <a:font script="Hans" typeface="宋体" />
-                <a:font script="Hant" typeface="新細明體" />
-                <a:font script="Arab" typeface="Times New Roman" />
-                <a:font script="Hebr" typeface="Times New Roman" />
-                <a:font script="Thai" typeface="Tahoma" />
-                <a:font script="Ethi" typeface="Nyala" />
-                <a:font script="Beng" typeface="Vrinda" />
-                <a:font script="Gujr" typeface="Shruti" />
-                <a:font script="Khmr" typeface="MoolBoran" />
-                <a:font script="Knda" typeface="Tunga" />
-                <a:font script="Guru" typeface="Raavi" />
-                <a:font script="Cans" typeface="Euphemia" />
-                <a:font script="Cher" typeface="Plantagenet Cherokee" />
-                <a:font script="Yiii" typeface="Microsoft Yi Baiti" />
-                <a:font script="Tibt" typeface="Microsoft Himalaya" />
-                <a:font script="Thaa" typeface="MV Boli" />
-                <a:font script="Deva" typeface="Mangal" />
-                <a:font script="Telu" typeface="Gautami" />
-                <a:font script="Taml" typeface="Latha" />
-                <a:font script="Syrc" typeface="Estrangelo Edessa" />
-                <a:font script="Orya" typeface="Kalinga" />
-                <a:font script="Mlym" typeface="Kartika" />
-                <a:font script="Laoo" typeface="DokChampa" />
-                <a:font script="Sinh" typeface="Iskoola Pota" />
-                <a:font script="Mong" typeface="Mongolian Baiti" />
-                <a:font script="Viet" typeface="Times New Roman" />
-                <a:font script="Uigh" typeface="Microsoft Uighur" />
-            </a:majorFont>
-            <a:minorFont>
-                <a:latin typeface="Calibri" />
-                <a:ea typeface="" />
-                <a:cs typeface="" />
-                <a:font script="Jpan" typeface="MS Pゴシック" />
-                <a:font script="Hang" typeface="맑은 고딕" />
-                <a:font script="Hans" typeface="宋体" />
-                <a:font script="Hant" typeface="新細明體" />
-                <a:font script="Arab" typeface="Arial" />
-                <a:font script="Hebr" typeface="Arial" />
-                <a:font script="Thai" typeface="Tahoma" />
-                <a:font script="Ethi" typeface="Nyala" />
-                <a:font script="Beng" typeface="Vrinda" />
-                <a:font script="Gujr" typeface="Shruti" />
-                <a:font script="Khmr" typeface="DaunPenh" />
-                <a:font script="Knda" typeface="Tunga" />
-                <a:font script="Guru" typeface="Raavi" />
-                <a:font script="Cans" typeface="Euphemia" />
-                <a:font script="Cher" typeface="Plantagenet Cherokee" />
-                <a:font script="Yiii" typeface="Microsoft Yi Baiti" />
-                <a:font script="Tibt" typeface="Microsoft Himalaya" />
-                <a:font script="Thaa" typeface="MV Boli" />
-                <a:font script="Deva" typeface="Mangal" />
-                <a:font script="Telu" typeface="Gautami" />
-                <a:font script="Taml" typeface="Latha" />
-                <a:font script="Syrc" typeface="Estrangelo Edessa" />
-                <a:font script="Orya" typeface="Kalinga" />
-                <a:font script="Mlym" typeface="Kartika" />
-                <a:font script="Laoo" typeface="DokChampa" />
-                <a:font script="Sinh" typeface="Iskoola Pota" />
-                <a:font script="Mong" typeface="Mongolian Baiti" />
-                <a:font script="Viet" typeface="Arial" />
-                <a:font script="Uigh" typeface="Microsoft Uighur" />
-            </a:minorFont>
-        </a:fontScheme>
-        <a:fmtScheme name="Office">
-            <a:fillStyleLst>
-                <a:solidFill>
-                    <a:schemeClr val="phClr" />
-                </a:solidFill>
-                <a:gradFill rotWithShape="1">
-                    <a:gsLst>
-                        <a:gs pos="0">
-                            <a:schemeClr val="phClr">
-                                <a:tint val="50000" />
-                                <a:satMod val="300000" />
-                            </a:schemeClr>
-                        </a:gs>
-                        <a:gs pos="35000">
-                            <a:schemeClr val="phClr">
-                                <a:tint val="37000" />
-                                <a:satMod val="300000" />
-                            </a:schemeClr>
-                        </a:gs>
-                        <a:gs pos="100000">
-                            <a:schemeClr val="phClr">
-                                <a:tint val="15000" />
-                                <a:satMod val="350000" />
-                            </a:schemeClr>
-                        </a:gs>
-                    </a:gsLst>
-                    <a:lin ang="16200000" scaled="1" />
-                </a:gradFill>
-                <a:gradFill rotWithShape="1">
-                    <a:gsLst>
-                        <a:gs pos="0">
-                            <a:schemeClr val="phClr">
-                                <a:shade val="51000" />
-                                <a:satMod val="130000" />
-                            </a:schemeClr>
-                        </a:gs>
-                        <a:gs pos="80000">
-                            <a:schemeClr val="phClr">
-                                <a:shade val="93000" />
-                                <a:satMod val="130000" />
-                            </a:schemeClr>
-                        </a:gs>
-                        <a:gs pos="100000">
-                            <a:schemeClr val="phClr">
-                                <a:shade val="94000" />
-                                <a:satMod val="135000" />
-                            </a:schemeClr>
-                        </a:gs>
-                    </a:gsLst>
-                    <a:lin ang="16200000" scaled="0" />
-                </a:gradFill>
-            </a:fillStyleLst>
-            <a:lnStyleLst>
-                <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr">
-                    <a:solidFill>
-                        <a:schemeClr val="phClr">
-                            <a:shade val="95000" />
-                            <a:satMod val="105000" />
-                        </a:schemeClr>
-                    </a:solidFill>
-                    <a:prstDash val="solid" />
-                </a:ln>
-                <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr">
-                    <a:solidFill>
-                        <a:schemeClr val="phClr" />
-                    </a:solidFill>
-                    <a:prstDash val="solid" />
-                </a:ln>
-                <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr">
-                    <a:solidFill>
-                        <a:schemeClr val="phClr" />
-                    </a:solidFill>
-                    <a:prstDash val="solid" />
-                </a:ln>
-            </a:lnStyleLst>
-            <a:effectStyleLst>
-                <a:effectStyle>
-                    <a:effectLst>
-                        <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0">
-                            <a:srgbClr val="000000">
-                                <a:alpha val="38000" />
-                            </a:srgbClr>
-                        </a:outerShdw>
-                    </a:effectLst>
-                </a:effectStyle>
-                <a:effectStyle>
-                    <a:effectLst>
-                        <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0">
-                            <a:srgbClr val="000000">
-                                <a:alpha val="35000" />
-                            </a:srgbClr>
-                        </a:outerShdw>
-                    </a:effectLst>
-                </a:effectStyle>
-                <a:effectStyle>
-                    <a:effectLst>
-                        <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0">
-                            <a:srgbClr val="000000">
-                                <a:alpha val="35000" />
-                            </a:srgbClr>
-                        </a:outerShdw>
-                    </a:effectLst>
-                    <a:scene3d>
-                        <a:camera prst="orthographicFront">
-                            <a:rot lat="0" lon="0" rev="0" />
-                        </a:camera>
-                        <a:lightRig rig="threePt" dir="t">
-                            <a:rot lat="0" lon="0" rev="1200000" />
-                        </a:lightRig>
-                    </a:scene3d>
-                    <a:sp3d>
-                        <a:bevelT w="63500" h="25400" />
-                    </a:sp3d>
-                </a:effectStyle>
-            </a:effectStyleLst>
-            <a:bgFillStyleLst>
-                <a:solidFill>
-                    <a:schemeClr val="phClr" />
-                </a:solidFill>
-                <a:gradFill rotWithShape="1">
-                    <a:gsLst>
-                        <a:gs pos="0">
-                            <a:schemeClr val="phClr">
-                                <a:tint val="40000" />
-                                <a:satMod val="350000" />
-                            </a:schemeClr>
-                        </a:gs>
-                        <a:gs pos="40000">
-                            <a:schemeClr val="phClr">
-                                <a:tint val="45000" />
-                                <a:shade val="99000" />
-                                <a:satMod val="350000" />
-                            </a:schemeClr>
-                        </a:gs>
-                        <a:gs pos="100000">
-                            <a:schemeClr val="phClr">
-                                <a:shade val="20000" />
-                                <a:satMod val="255000" />
-                            </a:schemeClr>
-                        </a:gs>
-                    </a:gsLst>
-                    <a:path path="circle">
-                        <a:fillToRect l="50000" t="-80000" r="50000" b="180000" />
-                    </a:path>
-                </a:gradFill>
-                <a:gradFill rotWithShape="1">
-                    <a:gsLst>
-                        <a:gs pos="0">
-                            <a:schemeClr val="phClr">
-                                <a:tint val="80000" />
-                                <a:satMod val="300000" />
-                            </a:schemeClr>
-                        </a:gs>
-                        <a:gs pos="100000">
-                            <a:schemeClr val="phClr">
-                                <a:shade val="30000" />
-                                <a:satMod val="200000" />
-                            </a:schemeClr>
-                        </a:gs>
-                    </a:gsLst>
-                    <a:path path="circle">
-                        <a:fillToRect l="50000" t="50000" r="50000" b="50000" />
-                    </a:path>
-                </a:gradFill>
-            </a:bgFillStyleLst>
-        </a:fmtScheme>
-    </a:themeElements>
-    <a:objectDefaults />
-    <a:extraClrSchemeLst />
-</a:theme>

+ 0 - 12
tmp/excel_test_raw_data/08-2/xl/workbook.xml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
-	<fileVersion appName="xl" lastEdited="4" lowestEdited="4" rupBuild="4505"/>
-	<workbookPr defaultThemeVersion="124226"/>
-	<bookViews>
-		<workbookView xWindow="360" yWindow="345" windowWidth="14655" windowHeight="4305"/>
-	</bookViews>
-	<sheets>
-		<sheet name="第1页" sheetId="1" r:id="rId1"/>
-	</sheets>
-	<calcPr calcId="124519"/>
-</workbook>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 151683
tmp/excel_test_raw_data/08-2/xl/worksheets/sheet1.xml


+ 5 - 0
web/building_saas/report/js/jpc_output.js

@@ -123,6 +123,11 @@ let JpcCanvasOutput = {
                 let values = ("" + cell[JV.PROP_VALUE]).split('|');
                 let font = fonts[cell[JV.PROP_FONT]];
                 let control = controls[cell[JV.PROP_CONTROL]];
+                if (control.ShowZero === "F") {
+                    if (parseFloat(cell[JV.PROP_VALUE]) === 0.0) {
+                        values = [""];
+                    }
+                }
                 let height = cell[JV.PROP_AREA][JV.PROP_BOTTOM] - cell[JV.PROP_AREA][JV.PROP_TOP];
                 let area = [cell[JV.PROP_AREA][JV.PROP_LEFT] + me.offsetX, cell[JV.PROP_AREA][JV.PROP_TOP] + me.offsetY, cell[JV.PROP_AREA][JV.PROP_RIGHT] + me.offsetX, cell[JV.PROP_AREA][JV.PROP_BOTTOM] + me.offsetY];
                 for (let i = 0; i < values.length; i++) {