Commit 67382777 authored by 王果's avatar 王果

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents 45df4342 34717d28
...@@ -1365,12 +1365,31 @@ public class DPStatisticsServiceImpl { ...@@ -1365,12 +1365,31 @@ public class DPStatisticsServiceImpl {
regionCodeOrgCodeMap.put(dpFilterParamDto.getCityCode(), orgCode); regionCodeOrgCodeMap.put(dpFilterParamDto.getCityCode(), orgCode);
} }
Long certificateCount = jgUseRegistrationManageMapper.countCertificateByReginCode(orgCode); Long certificateCount = jgUseRegistrationManageMapper.countCertificateByReginCode(orgCode);
Long deviceCount = equipmentCategoryMapper.countEquipByReginCode(orgCode); Long deviceCount = countEquipByReginCode(orgCode);
result.put(DPMapStatisticsItemEnum.CERTIFICATE_COUNT.getCode(), certificateCount); result.put(DPMapStatisticsItemEnum.CERTIFICATE_COUNT.getCode(), certificateCount);
result.put(DPMapStatisticsItemEnum.DEVICE_COUNT.getCode(), deviceCount); result.put(DPMapStatisticsItemEnum.DEVICE_COUNT.getCode(), deviceCount);
return result; return result;
} }
private Long countEquipByReginCode(String orgCode) {
long num = 0;
CountRequest request = new CountRequest();
request.indices("idx_biz_view_jg_all");
BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
// 按照管辖机构区域信息模糊查询
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", orgCode + "*"));
// 纳管状态为已纳管
boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", true));
request.query(boolMust);
try {
CountResponse response = restHighLevelClient.count(request, RequestOptions.DEFAULT);
num = response.getCount();
} catch (IOException e) {
throw new RuntimeException(e);
}
return num;
}
public Map<String, Object> dataStatisticCountByReginCode(DPFilterParamDto dpFilterParamDto) { public Map<String, Object> dataStatisticCountByReginCode(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
List<Map<String, Object>> mapList = this.dataStatisticByReginCode(dpFilterParamDto); List<Map<String, Object>> mapList = this.dataStatisticByReginCode(dpFilterParamDto);
......
...@@ -90,6 +90,5 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> { ...@@ -90,6 +90,5 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
List<String> selectXiXianNew(); List<String> selectXiXianNew();
Long countEquipByReginCode(String orgCode);
} }
...@@ -680,15 +680,4 @@ ...@@ -680,15 +680,4 @@
AND ( ibjoi."CODE96333" NOT LIKE'31%' OR ibjoi."CODE96333" IS NULL ) AND ( ibjoi."CODE96333" NOT LIKE'31%' OR ibjoi."CODE96333" IS NULL )
AND "CLAIM_STATUS" = '已认领'; AND "CLAIM_STATUS" = '已认领';
</select> </select>
<select id="countEquipByReginCode" resultType="java.lang.Long">
select
count(1)
from
idx_biz_jg_use_info ibjui,
idx_biz_jg_supervision_info ibjsi
where
ibjui."RECORD" = ibjsi."RECORD"
and ibjsi."ORG_BRANCH_CODE" like concat (#{reginCode},'%')
and ibjui."IS_INTO_MANAGEMENT" = true
</select>
</mapper> </mapper>
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