Commit f176b13e authored by tianyiming's avatar tianyiming

fix: 修正逻辑错误并优化返回值

parent 7fa341a8
......@@ -711,7 +711,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
dto.get("unitType").toString().contains("安装改造维修单位"))) {
permissionStatus = noneStr;
}
if(dto.get("unitType").equals("使用单位") || dto.get("unitType").equals("个人主体")){
if (dto.get("unitType").equals("使用单位") || dto.get("unitType").equals("个人主体")) {
permissionStatus = null;
}
dto.put("permissionStatus", permissionStatus);
......@@ -3039,7 +3039,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
if (groupField.equals("EQU_LIST_CODE")) {
gasBoolQueryBuilder = QueryBuilderUtils.copyBoolQuery(boolMust);
}
if(!"2300".equals(equipCode)){
if (!"2300".equals(equipCode)) {
boolMust.mustNot(QueryBuilders.matchQuery("EQU_CATEGORY_CODE", "2300"));
}
getStatisticCountByGroup(request, builder, boolMust, groupField, staticCountByGroup, "noGas");
......@@ -3666,14 +3666,16 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
return 0;
}
Page<String> recordDtoPage = new Page<>();
Integer total = 0;
for (int j = 0; j <= times; j++) {
recordDtoPage.setCurrent(j + 1);
recordDtoPage.setSize(5000);
Page<String> refreshRecords = tzsCustomFilterMapper.selectRecords(recordDtoPage);
if(!ObjectUtils.isEmpty(refreshRecords)&& refreshRecords.getRecords().size() > 0){
if (!ObjectUtils.isEmpty(refreshRecords) && refreshRecords.getRecords().size() > 0) {
total += refreshRecords.getRecords().size();
tzsCustomFilterMapper.addGas(refreshRecords.getRecords());
}
}
return null;
return total;
}
}
\ No newline at end of file
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