فهرست منبع

feat: 报表2-1接口相关

vian 4 سال پیش
والد
کامیت
b596a73451
1فایلهای تغییر یافته به همراه16 افزوده شده و 0 حذف شده
  1. 16 0
      modules/main/facade/bill_facade.js

+ 16 - 0
modules/main/facade/bill_facade.js

@@ -183,6 +183,22 @@ module.exports={
         });
         return map;
     },
+    // 获取概算汇总单项工程级别数据(拍好序的,报表接口用)
+    getSinglesBudgetSummary: async function (constructionID) {
+        const items = await this.getBudgetSummary(constructionID, true);
+        // 去除建设项目层级
+        items.shift();
+        items.forEach(item => {
+            // 方便报表取值处理
+            if (item.projType === 'Engineering') {
+                item.engineeringName = item.name || '';
+            } else if (item.projType === 'Tender') {
+                item.tenderName = item.name || '';
+            }
+        });
+        return items;
+    },
+
     // 获取概算汇总数据(拍好序的)
     // 如果isSimple为true,只进行工程费用部分汇总,只返回工程费用部分数据
     getBudgetSummary: async function (constructionID, isSimple = false) {