Explorar o código

报表bug同步

zhangweicheng %!s(int64=5) %!d(string=hai) anos
pai
achega
b73746a9d9
Modificáronse 1 ficheiros con 8 adicións e 7 borrados
  1. 8 7
      modules/main/facade/project_facade.js

+ 8 - 7
modules/main/facade/project_facade.js

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