Commit d3564cca authored by suhuiguang's avatar suhuiguang

1.压力管道数量算在特种设备总量里面

parent 6ff3668e
...@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.statistics.api.mapper.CommonBaseMapper; ...@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.statistics.api.mapper.CommonBaseMapper;
import com.yeejoin.amos.boot.module.statistics.api.mapper.ZLStatisticsMapper; import com.yeejoin.amos.boot.module.statistics.api.mapper.ZLStatisticsMapper;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto; import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipTechParamPipelineMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipTechParamPipelineMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper;
import com.yeejoin.amos.feign.systemctl.Systemctl; import com.yeejoin.amos.feign.systemctl.Systemctl;
...@@ -46,11 +47,6 @@ import java.util.stream.Collectors; ...@@ -46,11 +47,6 @@ import java.util.stream.Collectors;
public class StCommonServiceImpl { public class StCommonServiceImpl {
/** /**
* 压力容器设备种类
*/
public final static String EQU_LIST_CYLINDER = "2000";
/**
* 气瓶设备类别 * 气瓶设备类别
*/ */
public final static String EQU_CATEGORY_CYLINDER = "2300"; public final static String EQU_CATEGORY_CYLINDER = "2300";
...@@ -243,9 +239,10 @@ public class StCommonServiceImpl { ...@@ -243,9 +239,10 @@ public class StCommonServiceImpl {
Map<String, Long> countMap = new HashMap<>(); Map<String, Long> countMap = new HashMap<>();
for (Terms.Bucket bucket : terms.getBuckets()) { for (Terms.Bucket bucket : terms.getBuckets()) {
// 压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量 // 压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
if (bucket.getKeyAsString().equals(EQU_LIST_CYLINDER)) { if (bucket.getKeyAsString().equals(EquipmentClassifityEnum.YLRQ.getCode())) {
countMap.put(bucket.getKeyAsString(), bucket.getDocCount() - cylinderNum); countMap.put(bucket.getKeyAsString(), bucket.getDocCount() - cylinderNum);
} else if (equipmentCategoryDtos.stream().anyMatch(e -> e.getCode().equalsIgnoreCase(bucket.getKeyAsString()))) { } else if (equipmentCategoryDtos.stream().anyMatch(e -> e.getCode().equalsIgnoreCase(bucket.getKeyAsString()))) {
// 是八大类且非压力管道时(压力管道按照长度单独统计)
countMap.put(bucket.getKeyAsString(), bucket.getDocCount()); countMap.put(bucket.getKeyAsString(), bucket.getDocCount());
} }
} }
......
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