|
@@ -581,9 +581,9 @@ async function getBillsByProjectID(projectID) {
|
|
|
let rationFee = _.find(b._doc.fees, {
|
|
let rationFee = _.find(b._doc.fees, {
|
|
|
"fieldName": "rationCommon"
|
|
"fieldName": "rationCommon"
|
|
|
});
|
|
});
|
|
|
- if (commonFee && commonFee.totalFee) prices[projectName] = commonFee.totalFee;
|
|
|
|
|
- if (commonFee && commonFee.unitFee) unitPrices[projectName] = commonFee.unitFee;
|
|
|
|
|
- if (rationFee && rationFee.totalFee) rationCommons[projectName] = rationFee.totalFee;
|
|
|
|
|
|
|
+ if (commonFee && commonFee.tenderTotalFee) prices[projectName] = commonFee.tenderTotalFee;
|
|
|
|
|
+ if (commonFee && commonFee.tenderUnitFee) unitPrices[projectName] = commonFee.tenderUnitFee;
|
|
|
|
|
+ if (rationFee && rationFee.tenderTotalFee) rationCommons[projectName] = rationFee.tenderTotalFee;
|
|
|
baseProgressiveFees[projectName] = b.baseProgressiveFee;
|
|
baseProgressiveFees[projectName] = b.baseProgressiveFee;
|
|
|
|
|
|
|
|
quantityMap[projectName] = b.quantity;
|
|
quantityMap[projectName] = b.quantity;
|
|
@@ -759,7 +759,7 @@ function mergeGLJ(mp, projects) {
|
|
|
gljList = [];
|
|
gljList = [];
|
|
|
for (let g of mp.gljList) {
|
|
for (let g of mp.gljList) {
|
|
|
g.quantityMap = {};
|
|
g.quantityMap = {};
|
|
|
- g.quantityMap[mp.name] = g.quantity;
|
|
|
|
|
|
|
+ g.quantityMap[mp.name] = g.tenderQuantity;
|
|
|
gljMap[gljUtil.getIndex(g)] = g;
|
|
gljMap[gljUtil.getIndex(g)] = g;
|
|
|
gljList.push(g);
|
|
gljList.push(g);
|
|
|
|
|
|
|
@@ -768,12 +768,12 @@ function mergeGLJ(mp, projects) {
|
|
|
let temList = projects[i].gljList;
|
|
let temList = projects[i].gljList;
|
|
|
for (let t of temList) {
|
|
for (let t of temList) {
|
|
|
t.quantityMap = {};
|
|
t.quantityMap = {};
|
|
|
- t.quantityMap[projects[i].name] = t.quantity;
|
|
|
|
|
|
|
+ t.quantityMap[projects[i].name] = t.tenderQuantity;
|
|
|
//这里除了5个属性相同判断为同一个之外,还要判断市场价相同,才认为是同一个工料机
|
|
//这里除了5个属性相同判断为同一个之外,还要判断市场价相同,才认为是同一个工料机
|
|
|
let connect_key = gljUtil.getIndex(t);
|
|
let connect_key = gljUtil.getIndex(t);
|
|
|
let g = gljMap[connect_key];
|
|
let g = gljMap[connect_key];
|
|
|
if (g && g.marketPrice == t.marketPrice) {
|
|
if (g && g.marketPrice == t.marketPrice) {
|
|
|
- g.quantityMap[projects[i].name] = t.quantity;
|
|
|
|
|
|
|
+ g.quantityMap[projects[i].name] = t.tenderQuantity;
|
|
|
} else {
|
|
} else {
|
|
|
gljMap[connect_key] = t;
|
|
gljMap[connect_key] = t;
|
|
|
gljList.push(t);
|
|
gljList.push(t);
|
|
@@ -840,9 +840,10 @@ async function getProjectGLJPrice(projectID, unitPriceFileId, property) {
|
|
|
let [gljList, mixRatioConnectData, mixRatioMap, unitPriceMap] = await gljListModel.getListByProjectId(projectID, unitPriceFileId);
|
|
let [gljList, mixRatioConnectData, mixRatioMap, unitPriceMap] = await gljListModel.getListByProjectId(projectID, unitPriceFileId);
|
|
|
gljList = JSON.parse(JSON.stringify(gljList));
|
|
gljList = JSON.parse(JSON.stringify(gljList));
|
|
|
for (let glj of gljList) {
|
|
for (let glj of gljList) {
|
|
|
|
|
+ let tenderCoe = gljUtil.getTenderPriceCoe(glj, property);
|
|
|
let result = gljUtil.getGLJPrice(glj, {
|
|
let result = gljUtil.getGLJPrice(glj, {
|
|
|
gljList: gljList
|
|
gljList: gljList
|
|
|
- }, calcOptions, labourCoeDatas, decimalObj, false, _, scMathUtil);
|
|
|
|
|
|
|
+ }, calcOptions, labourCoeDatas, decimalObj, false,tenderCoe,true));
|
|
|
glj.marketPrice = result.marketPrice;
|
|
glj.marketPrice = result.marketPrice;
|
|
|
glj.basePrice = result.basePrice;
|
|
glj.basePrice = result.basePrice;
|
|
|
}
|
|
}
|