/** * Created by zhang on 2018/6/7. */ const fs = require('fs'); let _= require('lodash'); const scMathUtil = require('./scMathUtil').getUtil(); let gljNodeUtil = require("./web/gljUtil"); // let data = fs.readFileSync(__dirname + '/web/gljUtil.js', 'utf8', 'r'); // eval(data + ' ; gljNodeUtil = gljUtil; '); module.exports = { calcProjectGLJQuantity: calcProjectGLJQuantity, getGLJPrice: getGLJPrice, calcPriceDiff: calcPriceDiff, getMarketPrice: getMarketPrice, getBasePrice: getBasePrice, getAdjustPrice: getAdjustPrice, getMainType: getMainType, isConcreteType: isConcreteType, isCommercialConcreteType: isCommercialConcreteType, getIndex: getIndex, sortRationGLJ: sortRationGLJ, sortProjectGLJ: sortProjectGLJ, getCCSProjectGLJ: getCCSProjectGLJ, getBaseCCSMixRatio: getBaseCCSMixRatio, setMaterialCalcRationFee: setMaterialCalcRationFee, getTenderPriceCoe: getTenderPriceCoe }; function calcProjectGLJQuantity(projectGLJDatas,rationGLJDatas,rationDatas,billsDatas,q_decimal) { gljNodeUtil.calcProjectGLJQuantity(projectGLJDatas,rationGLJDatas,rationDatas,billsDatas,q_decimal,_,scMathUtil); } function getGLJPrice(glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio=false,tenderCoe, isReport) { return gljNodeUtil.getGLJPrice(glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio,_,scMathUtil,tenderCoe, isReport); } function setMaterialCalcRationFee(ration,ration_gljs,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,_,scMathUtil) { return gljNodeUtil.setMaterialCalcRationFee(ration,ration_gljs,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,_,scMathUtil); } function getMarketPrice(glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio=false,tenderCoe) { return gljNodeUtil.getMarketPrice(glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio,_,scMathUtil,tenderCoe); } function getBasePrice(glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio=false) { return gljNodeUtil.getBasePrice(glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio,_,scMathUtil); } function getAdjustPrice(glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio=false,_,scMathUtil) { return gljNodeUtil.getAdjustPrice(glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio,_,scMathUtil); } function calcPriceDiff(glj,calcOptions) { gljNodeUtil.calcPriceDiff(glj,calcOptions); } function getMainType() { return gljNodeUtil.getMainType(); } function getIndex(obj, pops) { return gljNodeUtil.getIndex(obj, pops); } function isConcreteType(type) { return gljNodeUtil.isConcreteType(type); } function isCommercialConcreteType(type){ return gljNodeUtil.isCommercialConcreteType(type); } function sortRationGLJ(list, std) { return gljNodeUtil.sortRationGLJ(list, std); } function sortProjectGLJ(list,lodash) { return gljNodeUtil.sortProjectGLJ(list,lodash); } function getCCSProjectGLJ(unitFileID,project_id) { return gljNodeUtil.getCCSProjectGLJ(unitFileID,project_id); } function getBaseCCSMixRatio(unitFileID,consumption,connect_key) { return gljNodeUtil.getBaseCCSMixRatio(unitFileID,consumption,connect_key) } function getTenderPriceCoe(glj,tproperty){ return gljNodeUtil.getTenderPriceCoe(glj,tproperty); }