|
|
@@ -146,8 +146,10 @@ class Rpt_Data_Extractor {
|
|
|
rst.push(key);
|
|
|
if (key === projectConst.RATION_GLJ && (rst.indexOf(projectConst.PROJECTGLJ) < 0)) {
|
|
|
rst.push(projectConst.PROJECTGLJ);
|
|
|
+ if (rst.indexOf(projectConst.LABOUR_COE < 0)) rst.push(projectConst.LABOUR_COE);
|
|
|
}
|
|
|
if (key === projectConst.PROJECTGLJ) {
|
|
|
+ if (rst.indexOf(projectConst.LABOUR_COE < 0)) rst.push(projectConst.LABOUR_COE);
|
|
|
if (rst.indexOf(projectConst.RATION_GLJ) < 0) rst.push(projectConst.RATION_GLJ);
|
|
|
if (field[JV.PROP_FIELD_EXP_MAP].indexOf("'quantity'") > 0 ||
|
|
|
field[JV.PROP_FIELD_EXP_MAP].indexOf("'subdivisionQuantity'") > 0 ||
|
|
|
@@ -250,7 +252,7 @@ class Rpt_Data_Extractor {
|
|
|
for (let item of rawDataObj.prjData) {
|
|
|
setupFunc($PROJECT.DETAIL, item.moduleName, item);
|
|
|
}
|
|
|
- let projectGLJDatas = getModuleDataByKey(rawDataObj.prjData, "projectGLJ");
|
|
|
+ let projectGLJDatas = getModuleDataByKey(rawDataObj.prjData, projectConst.PROJECTGLJ);
|
|
|
if (projectGLJDatas) {
|
|
|
//增加一个辅助对象,方便通过gljid key直接获取数据,省去循环时间
|
|
|
let gljAssitantObj = {"gljIds": {}, "componentGljIds": {}};
|
|
|
@@ -263,9 +265,10 @@ class Rpt_Data_Extractor {
|
|
|
}
|
|
|
//顺便做个排序(跟UI一致的排序)
|
|
|
}
|
|
|
- let rationGLJDatas = getModuleDataByKey(rawDataObj.prjData, "ration_glj");
|
|
|
- let rationDatas = getModuleDataByKey(rawDataObj.prjData, "ration");
|
|
|
- let billsDatas = getModuleDataByKey(rawDataObj.prjData, "bills");
|
|
|
+ let labourCoeDatas = getModuleDataByKey(rawDataObj.prjData, projectConst.LABOUR_COE);
|
|
|
+ let rationGLJDatas = getModuleDataByKey(rawDataObj.prjData, projectConst.RATION_GLJ);
|
|
|
+ let rationDatas = getModuleDataByKey(rawDataObj.prjData, projectConst.RATION);
|
|
|
+ let billsDatas = getModuleDataByKey(rawDataObj.prjData, projectConst.BILLS);
|
|
|
let decimal = rawDataObj.prj.property.decimal.glj.quantity;
|
|
|
// let labourCoeDatas = getModuleDataByKey(rawDataObj.prjData, "labour_coe");
|
|
|
let calcOptions = rawDataObj.prj.property.calcOptions;
|
|
|
@@ -273,12 +276,23 @@ class Rpt_Data_Extractor {
|
|
|
if (projectGLJDatas && rationGLJDatas && rationDatas && billsDatas) {
|
|
|
gljUtil.calcProjectGLJQuantity(projectGLJDatas.data, rationGLJDatas.data, rationDatas.data, billsDatas.data, decimal);
|
|
|
}
|
|
|
- if (projectGLJDatas && rationGLJDatas) {
|
|
|
+ if (projectGLJDatas && rationGLJDatas && labourCoeDatas) {
|
|
|
//考虑调价情况
|
|
|
+ const newAdjPriceArr = [];
|
|
|
for (const glj of projectGLJDatas.data.gljList) {
|
|
|
- glj.unit_price.market_price = gljUtil.getMarketPrice(glj, projectGLJDatas.data, calcOptions, [], rawDataObj.prj.property.decimal, false);
|
|
|
- //备注:养护没有调价,就不用_tender了
|
|
|
+ newAdjPriceArr.push(gljUtil.getGLJPrice(glj, projectGLJDatas.data, calcOptions, labourCoeDatas, rawDataObj.prj.property.decimal, false, gljUtil.getTenderPriceCoe(glj, rawDataObj.prj.property), true));
|
|
|
+ // glj.unit_price.market_price = gljUtil.getMarketPrice(glj, projectGLJDatas.data, calcOptions, [], rawDataObj.prj.property.decimal, false);
|
|
|
+ }
|
|
|
+ for (let gljIdx = 0; gljIdx < newAdjPriceArr.length; gljIdx++) {
|
|
|
+ let newGlj = newAdjPriceArr[gljIdx];
|
|
|
+ let gljItem = projectGLJDatas.data.gljList[gljIdx];
|
|
|
+ let unit_price = gljItem.unit_price._doc ? gljItem.unit_price._doc : gljItem.unit_price;
|
|
|
+ unit_price.org_market_price = gljItem.unit_price.marketPrice;
|
|
|
+ unit_price.market_price = newGlj.marketPrice;
|
|
|
+ unit_price.org_basePrice = gljItem.unit_price.base_price;
|
|
|
+ unit_price.base_price = newGlj.basePrice;
|
|
|
}
|
|
|
+ // 备注:养护新增调价,处理上与建筑同步
|
|
|
}
|
|
|
}
|
|
|
//还有汇总的...
|