|
@@ -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"));
|