Kaynağa Gözat

补充统计

ximinghao 3 hafta önce
ebeveyn
işleme
441adb5dbc
1 değiştirilmiş dosya ile 44 ekleme ve 1 silme
  1. 44 1
      src/api/count.js

+ 44 - 1
src/api/count.js

@@ -400,6 +400,10 @@ export function countGroupService(start, end){
                 "table": "precount",
                 "column": "c_path",
                 "alias": "service_path"
+            }, {
+                "table": "precount",
+                "column": "c_type",
+                "alias": "service_type"
             }
         ]),
         "groupBy": JSON.stringify([
@@ -409,7 +413,11 @@ export function countGroupService(start, end){
             },{
                 "table": "precount",
                 "column": "c_path"
-            },
+            },{
+                
+                "table": "precount",
+                "column": "c_type"
+            }
         ]),
         "conditionsList": JSON.stringify([
             ...timeCheckers(start, end),
@@ -420,6 +428,41 @@ export function countGroupService(start, end){
 
     return resolveDmsMultiTableResult(postform(multiSearch, data));
 }
+export function countType(start, end){
+
+    let data = {
+        "columnId": preCountDmsId,
+        "autoSelectItem": false,
+        "page": 1,
+        "pageSize": 10000,
+        "columnAlias": "precount",
+        "selectItem": JSON.stringify([
+            {
+                "table": "precount",
+                "column": "c_count",
+                "function": "sum",
+                "alias": "count"
+            },{
+                "table": "precount",
+                "column": "c_type",
+                "alias": "service_type"
+            }
+        ]),
+        "groupBy": JSON.stringify([
+            {
+                "table": "precount",
+                "column": "c_type"
+            }
+        ]),
+        "conditionsList": JSON.stringify([
+            ...timeCheckers(start, end),
+            ...notNullAndEmptyCheckers("precount","c_type"),
+        ]),
+    }
+
+    return resolveDmsMultiTableResult(postform(multiSearch, data));
+}
+
 export function countUnitActive(start, end){
      let data = {
         "columnId": preCountDmsId,