Commit 4a6e648d authored by 李成龙's avatar 李成龙

修改大屏应急处置模块中间电梯设备统计

parent 070c8ee1
...@@ -482,12 +482,9 @@ public class YJDPStatisticsServiceImpl { ...@@ -482,12 +482,9 @@ public class YJDPStatisticsServiceImpl {
long dtEquCategoryCount = countMap.entrySet() long dtEquCategoryCount = countMap.entrySet()
.stream() .stream()
.filter(entry -> !ELEVATOR_EQU_LIST_CODE.equals(entry.getKey())) .filter(entry -> !ELEVATOR_EQU_LIST_CODE.equals(entry.getKey()))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)) .mapToLong(Map.Entry::getValue)
.values()
.stream()
.mapToLong(e -> e)
.sum(); .sum();
result.put("dtCountNotEquCategory", dtCount - dtEquCategoryCount); result.put("dtCountNotEquDefine", dtCount - dtEquCategoryCount);
// 电梯总量(台) // 电梯总量(台)
// result.put("dtCount", equDefineNumMap.values().stream().mapToLong(e -> e).sum()); // result.put("dtCount", equDefineNumMap.values().stream().mapToLong(e -> e).sum());
...@@ -574,12 +571,14 @@ public class YJDPStatisticsServiceImpl { ...@@ -574,12 +571,14 @@ public class YJDPStatisticsServiceImpl {
BoolQueryBuilder boolMust = QueryBuilders.boolQuery(); BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
String orgCode = stCommonService.getAndSetOrgCode(regionCode); String orgCode = stCommonService.getAndSetOrgCode(regionCode);
request.indices("idx_biz_view_jg_all"); // request.indices("idx_biz_view_jg_all");
request.indices("idx_biz_equipment_info");
// 按照管辖机构区域信息模糊查询 // 按照管辖机构区域信息模糊查询
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(orgCode) + "*")); //boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(orgCode) + "*"));//索引idx_biz_view_jg_all中的查询方式
boolMust.must(QueryBuilders.prefixQuery("ORG_BRANCH_CODE", orgCode));
//已赋码 //已赋码
boolMust.must(QueryBuilders.existsQuery("SUPERVISORY_CODE")); //boolMust.must(QueryBuilders.existsQuery("SUPERVISORY_CODE"));
boolMust.mustNot(QueryBuilders.termQuery("SUPERVISORY_CODE","null")); //boolMust.mustNot(QueryBuilders.termQuery("SUPERVISORY_CODE","null"));
//状态为已认领 //状态为已认领
String[] status = {"草稿","已拒领","待认领"}; String[] status = {"草稿","已拒领","待认领"};
boolMust.mustNot(QueryBuilders.termsQuery("STATUS",Arrays.asList(status))); boolMust.mustNot(QueryBuilders.termsQuery("STATUS",Arrays.asList(status)));
...@@ -607,12 +606,14 @@ public class YJDPStatisticsServiceImpl { ...@@ -607,12 +606,14 @@ public class YJDPStatisticsServiceImpl {
BoolQueryBuilder boolMust = QueryBuilders.boolQuery(); BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
String orgCode = stCommonService.getAndSetOrgCode(regionCode); String orgCode = stCommonService.getAndSetOrgCode(regionCode);
request.indices("idx_biz_view_jg_all"); // request.indices("idx_biz_view_jg_all");
request.indices("idx_biz_equipment_info");
// 按照管辖机构区域信息模糊查询 // 按照管辖机构区域信息模糊查询
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(orgCode) + "*")); //boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(orgCode) + "*"));//索引idx_biz_view_jg_all中的查询方式
boolMust.must(QueryBuilders.prefixQuery("ORG_BRANCH_CODE", orgCode));
//已赋码 //已赋码
boolMust.must(QueryBuilders.existsQuery("SUPERVISORY_CODE")); //boolMust.must(QueryBuilders.existsQuery("SUPERVISORY_CODE"));
boolMust.mustNot(QueryBuilders.termQuery("SUPERVISORY_CODE","null")); //boolMust.mustNot(QueryBuilders.termQuery("SUPERVISORY_CODE","null"));
//状态为已认领 //状态为已认领
String[] status = {"草稿","已拒领","待认领"}; String[] status = {"草稿","已拒领","待认领"};
boolMust.mustNot(QueryBuilders.termsQuery("STATUS",Arrays.asList(status))); boolMust.mustNot(QueryBuilders.termsQuery("STATUS",Arrays.asList(status)));
......
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