Explorar el Código

Merge remote-tracking branch 'origin/master'

FanXiaoyu hace 6 años
padre
commit
1576425433

+ 5 - 3
src/main/java/com/sagacloud/route/processors/PeriodTask/StatisticsProcessor.java

@@ -42,9 +42,11 @@ public class StatisticsProcessor implements Processor {
         addContractCount(venderStatisticsMap, contracts);
         addContractCount(venderStatisticsMap, warranties);
         ProjectStatistics ps = new ProjectStatistics();
-        if(venderStatisticsMap.size() == 0)
-            return;
-        ps.setCriterias(new ArrayList<>(venderStatisticsMap.values()));
+        if(venderStatisticsMap.size() == 0){
+            ps.setCriterias(new ArrayList<>());
+        }else {
+            ps.setCriterias(new ArrayList<>(venderStatisticsMap.values()));
+        }
         ps.setProjectId(projectId);
         exchange.getIn().setBody(JSONObject.toJSONString(ps));
         exchange.getIn().setHeader(Exchange.HTTP_URI, String.join("", InitEnvRoute.venders, "/auxiliary/property/create_by_project?method=POST"));

+ 8 - 1
src/main/resources/documentation.md

@@ -199,6 +199,7 @@ post体:
         "resultMsg":"***"
     }
 
+# 统计数据平台数据
 ##按项目更新资产统计数据
 
     http://<host>:<port>/venders-dp/project/sync
@@ -210,4 +211,10 @@ post体:
             "Pj1101080001",
             "Pj1101080002"
         ]
-    }
+    }
+    
+##更新所有项目资产统计数据
+
+    http://<host>:<port>/venders-dp/project/sync_all
+
+post方法, 不需要传Post数据: