|
|
@@ -40,6 +40,8 @@ const {
|
|
|
} = require('../../../public/common_constants');
|
|
|
const GLJListModel = require("../../glj/models/glj_list_model");
|
|
|
const projectDao = require('../../pm/models/project_model').project;
|
|
|
+const UnitPriceFileModel = require("../../glj/models/unit_price_file_model");
|
|
|
+
|
|
|
|
|
|
async function createRationGLJData(glj) {
|
|
|
glj.ID = uuidV1();
|
|
|
@@ -841,11 +843,17 @@ async function getProjectGLJPrice(projectID, unitPriceFileId, property) {
|
|
|
let labourCoeDatas = []; //取调整价才需要用到
|
|
|
let gljListModel = new GLJListModel();
|
|
|
let [gljList, mixRatioConnectData, mixRatioMap, unitPriceMap] = await gljListModel.getListByProjectId(projectID, unitPriceFileId);
|
|
|
+
|
|
|
+ let unitPriceFileModel = new UnitPriceFileModel();
|
|
|
+ let unitFileInfo = await unitPriceFileModel.findDataByCondition({id: unitPriceFileId});
|
|
|
+ let machineConstCoe = unitFileInfo.machineConstCoe?unitFileInfo.machineConstCoe:1
|
|
|
+
|
|
|
gljList = JSON.parse(JSON.stringify(gljList));
|
|
|
for (let glj of gljList) {
|
|
|
let tenderCoe = gljUtil.getTenderPriceCoe(glj, property);
|
|
|
let result = gljUtil.getGLJPrice(glj, {
|
|
|
- gljList: gljList
|
|
|
+ gljList: gljList,
|
|
|
+ constData:{machineConstCoe:machineConstCoe}
|
|
|
}, calcOptions, labourCoeDatas, decimalObj, false,tenderCoe,true);
|
|
|
glj.marketPrice = result.marketPrice;
|
|
|
glj.basePrice = result.basePrice;
|