diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/ecology/entity/EcologyFlowMapEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/ecology/entity/EcologyFlowMapEntity.java new file mode 100644 index 0000000..5ea3aab --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/ecology/entity/EcologyFlowMapEntity.java @@ -0,0 +1,26 @@ +package com.hnac.hzims.operational.ecology.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.math.BigDecimal; + +/** + * @author ysj + */ +@Data +@TableName("ecology_flow_map") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "生态流量地图数据表", description = "生态流量地图数据表") +public class EcologyFlowMapEntity extends TenantEntity { + + @ApiModelProperty(value = "区域编码") + private String areaCode; + + @ApiModelProperty(value = "区域名称") + private String areaName; +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/controller/EcologyController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/controller/EcologyController.java index 8fcf2aa..f18a640 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/controller/EcologyController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/controller/EcologyController.java @@ -6,6 +6,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.operational.ecology.entity.EcologyFlowDataEntity; import com.hnac.hzims.operational.ecology.entity.EcologyFlowStationEntity; import com.hnac.hzims.operational.ecology.service.EcologyFlowDataService; +import com.hnac.hzims.operational.ecology.service.EcologyFlowMapService; import com.hnac.hzims.operational.ecology.service.EcologyFlowStationService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -30,10 +31,12 @@ import javax.validation.Valid; @RequestMapping("/ecology") public class EcologyController extends BladeController { - private final EcologyFlowStationService stationService; - + private final EcologyFlowMapService mapService; + private final EcologyFlowDataService dataService; + private final EcologyFlowStationService stationService; + /** * 数据初始化 @@ -46,6 +49,16 @@ public class EcologyController extends BladeController { return R.status(stationService.generate(mon,year)); } + /** + * 数据初始化 + * @return + */ + @PostMapping("/map") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "获取地图编码", notes = "获取地图编码") + public R map() { + return R.data(mapService.map()); + } /** * 站点数据排行 diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/mapper/EcologyFlowMapMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/mapper/EcologyFlowMapMapper.java new file mode 100644 index 0000000..c11e901 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/mapper/EcologyFlowMapMapper.java @@ -0,0 +1,11 @@ +package com.hnac.hzims.operational.ecology.mapper; + +import com.hnac.hzims.operational.ecology.entity.EcologyFlowMapEntity; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +/** + * @author YSJ + */ +public interface EcologyFlowMapMapper extends UserDataScopeBaseMapper { + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/mapper/EcologyFlowMapMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/mapper/EcologyFlowMapMapper.xml new file mode 100644 index 0000000..8971061 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/mapper/EcologyFlowMapMapper.xml @@ -0,0 +1,4 @@ + + + + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowDataService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowDataService.java index 3e2c7e6..407fcfb 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowDataService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowDataService.java @@ -7,7 +7,6 @@ import org.springblade.core.mp.base.BaseService; import java.util.List; /** - * 告警处理接口 * @author ysj */ public interface EcologyFlowDataService extends BaseService { diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowMapService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowMapService.java new file mode 100644 index 0000000..ee7e183 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowMapService.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.operational.ecology.service; + +import com.hnac.hzims.operational.ecology.entity.EcologyFlowMapEntity; +import org.springblade.core.mp.base.BaseService; + +/** + * 生态流量地图接口 + * @author ysj + */ +public interface EcologyFlowMapService extends BaseService { + EcologyFlowMapEntity map(); +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowStationService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowStationService.java index ba6ba2a..fffa690 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowStationService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowStationService.java @@ -9,7 +9,6 @@ import org.springblade.core.mp.base.BaseService; import java.util.List; /** - * 告警处理接口 * @author ysj */ public interface EcologyFlowStationService extends BaseService { diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowDataServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowDataServiceImpl.java index 77c7365..5a26bf4 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowDataServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowDataServiceImpl.java @@ -19,7 +19,6 @@ import java.util.*; import java.util.stream.Collectors; /** - * 历史告警实现类 * @author ysj */ @Slf4j diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowMapServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowMapServiceImpl.java new file mode 100644 index 0000000..9e06806 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowMapServiceImpl.java @@ -0,0 +1,35 @@ +package com.hnac.hzims.operational.ecology.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.hnac.hzims.equipment.entity.EmTreeEntity; +import com.hnac.hzims.operational.ecology.entity.EcologyFlowMapEntity; +import com.hnac.hzims.operational.ecology.mapper.EcologyFlowMapMapper; +import com.hnac.hzims.operational.ecology.service.EcologyFlowMapService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 生态流量地图接口 + * @author ysj + */ +@Slf4j +@Service +@RequiredArgsConstructor +public class EcologyFlowMapServiceImpl extends BaseServiceImpl implements EcologyFlowMapService { + + /** + * 获取地图 + * @return + */ + @Override + public EcologyFlowMapEntity map() { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(EcologyFlowMapEntity::getIsDeleted,0); + List maps = this.list(wrapper); + return maps.get(0); + } +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowStationServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowStationServiceImpl.java index 30f9969..158390e 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowStationServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowStationServiceImpl.java @@ -34,7 +34,6 @@ import java.util.*; import java.util.stream.Collectors; /** - * 历史告警实现类 * @author ysj */ @Slf4j