tyty
1 year ago
10 changed files with 103 additions and 6 deletions
@ -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; |
||||||
|
} |
@ -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<EcologyFlowMapEntity> { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,4 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="com.hnac.hzims.operational.ecology.mapper.EcologyFlowMapMapper"> |
||||||
|
</mapper> |
@ -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> { |
||||||
|
EcologyFlowMapEntity map(); |
||||||
|
} |
@ -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<EcologyFlowMapMapper, EcologyFlowMapEntity> implements EcologyFlowMapService { |
||||||
|
|
||||||
|
/** |
||||||
|
* 获取地图 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public EcologyFlowMapEntity map() { |
||||||
|
LambdaQueryWrapper<EcologyFlowMapEntity> wrapper = new LambdaQueryWrapper<>(); |
||||||
|
wrapper.eq(EcologyFlowMapEntity::getIsDeleted,0); |
||||||
|
List<EcologyFlowMapEntity> maps = this.list(wrapper); |
||||||
|
return maps.get(0); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue