Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
tyty 1 year ago
parent
commit
3f3c89eace
  1. 26
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/ecology/entity/EcologyFlowMapEntity.java
  2. 17
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/controller/EcologyController.java
  3. 11
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/mapper/EcologyFlowMapMapper.java
  4. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/mapper/EcologyFlowMapMapper.xml
  5. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowDataService.java
  6. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowMapService.java
  7. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowStationService.java
  8. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowDataServiceImpl.java
  9. 35
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowMapServiceImpl.java
  10. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowStationServiceImpl.java

26
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;
}

17
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.EcologyFlowDataEntity;
import com.hnac.hzims.operational.ecology.entity.EcologyFlowStationEntity; import com.hnac.hzims.operational.ecology.entity.EcologyFlowStationEntity;
import com.hnac.hzims.operational.ecology.service.EcologyFlowDataService; 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 com.hnac.hzims.operational.ecology.service.EcologyFlowStationService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -30,10 +31,12 @@ import javax.validation.Valid;
@RequestMapping("/ecology") @RequestMapping("/ecology")
public class EcologyController extends BladeController { public class EcologyController extends BladeController {
private final EcologyFlowStationService stationService; private final EcologyFlowMapService mapService;
private final EcologyFlowDataService dataService; 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 R.status(stationService.generate(mon,year));
} }
/**
* 数据初始化
* @return
*/
@PostMapping("/map")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "获取地图编码", notes = "获取地图编码")
public R map() {
return R.data(mapService.map());
}
/** /**
* 站点数据排行 * 站点数据排行

11
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<EcologyFlowMapEntity> {
}

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/mapper/EcologyFlowMapMapper.xml

@ -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>

1
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; import java.util.List;
/** /**
* 告警处理接口
* @author ysj * @author ysj
*/ */
public interface EcologyFlowDataService extends BaseService<EcologyFlowDataEntity> { public interface EcologyFlowDataService extends BaseService<EcologyFlowDataEntity> {

12
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> {
EcologyFlowMapEntity map();
}

1
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; import java.util.List;
/** /**
* 告警处理接口
* @author ysj * @author ysj
*/ */
public interface EcologyFlowStationService extends BaseService<EcologyFlowStationEntity> { public interface EcologyFlowStationService extends BaseService<EcologyFlowStationEntity> {

1
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; import java.util.stream.Collectors;
/** /**
* 历史告警实现类
* @author ysj * @author ysj
*/ */
@Slf4j @Slf4j

35
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<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);
}
}

1
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; import java.util.stream.Collectors;
/** /**
* 历史告警实现类
* @author ysj * @author ysj
*/ */
@Slf4j @Slf4j

Loading…
Cancel
Save