Commit a2a3fa8b authored by hcing's avatar hcing

fix(statistics): bugfix

parent 2f349912
...@@ -202,7 +202,7 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController { ...@@ -202,7 +202,7 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
JSONObject filterParams = jsonObject.getJSONObject("filterParams"); JSONObject filterParams = jsonObject.getJSONObject("filterParams");
JSONArray expiryDate = filterParams.getJSONArray("expiryDate"); JSONArray expiryDate = filterParams.getJSONArray("expiryDate");
expiryDate.remove(targetValue); expiryDate.remove(targetValue);
JSONArray certNo = filterParams.getJSONArray("certNo"); JSONArray certNo = Optional.ofNullable(filterParams.getJSONArray("certNo")).orElseGet(JSONArray::new);
certNo.add("0"); certNo.add("0");
filterParams.fluentPut("expiryDate", expiryDate).fluentPut("certNo", certNo); filterParams.fluentPut("expiryDate", expiryDate).fluentPut("certNo", certNo);
jsonObject.put("filterParams", filterParams); jsonObject.put("filterParams", filterParams);
......
...@@ -3162,7 +3162,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl { ...@@ -3162,7 +3162,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
BoolQueryBuilder nothingBoolQuery = QueryBuilderUtils.copyBoolQuery(boolQuery); BoolQueryBuilder nothingBoolQuery = QueryBuilderUtils.copyBoolQuery(boolQuery);
NestedQueryBuilder nothingNestedQuery = QueryBuilders.nestedQuery( NestedQueryBuilder nothingNestedQuery = QueryBuilders.nestedQuery(
path, path,
QueryBuilders.boolQuery().must(QueryBuilders.existsQuery(nestedField)), QueryBuilders.boolQuery().mustNot(QueryBuilders.existsQuery(nestedField)),
ScoreMode.None ScoreMode.None
); );
nothingBoolQuery.must(nothingNestedQuery); nothingBoolQuery.must(nothingNestedQuery);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment