tyty
1 year ago
10 changed files with 310 additions and 58 deletions
@ -0,0 +1,45 @@
|
||||
package com.hnac.hzims.operational.config.vo; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @Author WL |
||||
* @Version v1.0 |
||||
* @Serial 1.0 |
||||
* @Date 2023/8/1 10:37 |
||||
*/ |
||||
@Data |
||||
public class PointDataVo { |
||||
|
||||
/** |
||||
* 站点id |
||||
*/ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
private String station; |
||||
|
||||
|
||||
/** |
||||
* 站点名称 |
||||
*/ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
private String stationName; |
||||
/** |
||||
* 数据采集时间 |
||||
*/ |
||||
private String time; |
||||
/** |
||||
* 数据 |
||||
*/ |
||||
private String value; |
||||
/** |
||||
* 质量值 |
||||
*/ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
private Integer q; |
||||
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY) |
||||
private String signage; |
||||
|
||||
} |
@ -0,0 +1,62 @@
|
||||
package com.hnac.hzims.operational.station.controller; |
||||
|
||||
|
||||
import io.swagger.annotations.Api; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.system.entity.Dict; |
||||
import org.springblade.system.feign.IDictClient; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.util.List; |
||||
import java.util.stream.Collectors; |
||||
|
||||
@RestController |
||||
@RequestMapping("/country/selector") |
||||
@Api(value = "国家管理", tags = "国家管理") |
||||
public class CountrySelectorController { |
||||
|
||||
|
||||
@Autowired |
||||
private IDictClient iDictClient; |
||||
|
||||
|
||||
/** |
||||
* 查询国家字典数据 |
||||
* |
||||
* @return |
||||
*/ |
||||
@GetMapping("/countryOfIssue") |
||||
public R countryOfIssue() { |
||||
R<List<Dict>> regionGlobal = iDictClient.getList("region_global"); |
||||
if (!regionGlobal.isSuccess()) { |
||||
return R.fail("查询数据不存在"); |
||||
} |
||||
List<Dict> collect = regionGlobal.getData().stream() |
||||
.filter(item -> item.getParentId().longValue() == 1684523498650771L) |
||||
.collect(Collectors.toList()); |
||||
return R.data(collect); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 查询省份字典数据 |
||||
* |
||||
* @return |
||||
*/ |
||||
@GetMapping("/loadProvince") |
||||
public R loadProvince() { |
||||
R<List<Dict>> regionGlobal = iDictClient.getList("region_global"); |
||||
if (!regionGlobal.isSuccess()) { |
||||
return R.fail("查询数据不存在"); |
||||
} |
||||
List<Dict> collect = regionGlobal.getData().stream() |
||||
.filter(item -> item.getParentId().longValue() == 1684523498650771459L) |
||||
.collect(Collectors.toList()); |
||||
return R.data(collect); |
||||
} |
||||
|
||||
|
||||
} |
Loading…
Reference in new issue