45 changed files with 1958 additions and 313 deletions
@ -0,0 +1,39 @@ |
|||
package com.kms.yg.cz.controller; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.kms.yg.cz.dto.AlarmInfoDto; |
|||
import com.kms.yg.cz.dto.AlarmQueDto; |
|||
import com.kms.yg.cz.dto.MonitorQueDto; |
|||
import com.kms.yg.cz.service.AlarmService; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.AllArgsConstructor; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
|
|||
/** |
|||
* 监测信息Controller |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/cz/alarm") |
|||
@AllArgsConstructor |
|||
@Api(tags = "监测告警信息") |
|||
public class AlarmController { |
|||
|
|||
private final AlarmService alarmService; |
|||
|
|||
|
|||
@PostMapping("/page") |
|||
@ApiOperation("分页查询监测信息") |
|||
public IPage<AlarmInfoDto> page(@RequestBody AlarmQueDto sp) { |
|||
return alarmService.pageQuery(sp); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,52 @@ |
|||
package com.kms.yg.cz.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.shuili.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@TableName("bs_sgc_st_alarm") |
|||
@ApiModel("告警信息") |
|||
public class AlarmInfo extends BaseEntity { |
|||
|
|||
@ApiModelProperty(value = "水库名称") |
|||
private String resName; |
|||
|
|||
@ApiModelProperty(value = "水库编码") |
|||
private String resCode; |
|||
|
|||
@ApiModelProperty(value = "测站名称") |
|||
private String stnm; |
|||
|
|||
@ApiModelProperty(value = "测站编码") |
|||
private String stcd; |
|||
|
|||
@ApiModelProperty(value = "测站类型") |
|||
private String sttp; |
|||
|
|||
@ApiModelProperty(value = "预警类型") |
|||
private String alarmType; |
|||
|
|||
@ApiModelProperty(value = "监测数据") |
|||
private String monitorData; |
|||
|
|||
@ApiModelProperty(value = "预警值") |
|||
private String alarmValue; |
|||
|
|||
@ApiModelProperty(value = "预警时间") |
|||
private Date alarmTime; |
|||
|
|||
@ApiModelProperty(value = "预警状态") |
|||
private String alarmStatus; |
|||
|
|||
@ApiModelProperty(value = "告警处置") |
|||
private String alarmDisposal; |
|||
|
|||
@TableField(exist = false) |
|||
private String remark; |
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.kms.yg.cz.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.kms.yg.cz.enmu.MsgTypeEnum; |
|||
import com.kms.yxgh.common.dto.OperatorDto; |
|||
import com.shuili.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@TableName("bs_sgc_st_micfg") |
|||
@ApiModel("监测配置信息") |
|||
public class MonitorConfig extends BaseEntity { |
|||
|
|||
@ApiModelProperty("水库编码") |
|||
private String resCode; |
|||
|
|||
@ApiModelProperty("水库名称") |
|||
private String resName; |
|||
|
|||
@ApiModelProperty("监测类型") |
|||
private String mpType; |
|||
|
|||
@ApiModelProperty("测站编码") |
|||
private String stcd; |
|||
|
|||
@ApiModelProperty("预警类型") |
|||
private String warnType; |
|||
|
|||
@ApiModelProperty("预警值") |
|||
private String warnValue; |
|||
|
|||
@ApiModelProperty("预警通知人") |
|||
private String warnOperators; |
|||
|
|||
@ApiModelProperty("预警通知方式") |
|||
private String msgType; |
|||
|
|||
@ApiModelProperty("信息模板") |
|||
private String msgTemplate; |
|||
|
|||
@ApiModelProperty("预警通知间隔") |
|||
private String warnInterval; |
|||
|
|||
@ApiModelProperty("预警时间单位") |
|||
private String warnTimeUnit; |
|||
|
|||
@TableField(exist = false) |
|||
private String remark; |
|||
|
|||
} |
@ -0,0 +1,50 @@ |
|||
package com.kms.yg.cz.dto; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@ApiModel("告警信息") |
|||
public class AlarmInfoDto { |
|||
|
|||
@ApiModelProperty(value = "告警信息ID") |
|||
private String id; |
|||
|
|||
@ApiModelProperty(value = "水库名称") |
|||
private String resName; |
|||
|
|||
@ApiModelProperty(value = "水库编码") |
|||
private String resCode; |
|||
|
|||
@ApiModelProperty(value = "测站名称") |
|||
private String stnm; |
|||
|
|||
@ApiModelProperty(value = "测站编码") |
|||
private String stcd; |
|||
|
|||
@ApiModelProperty(value = "测站类型") |
|||
private String sttp; |
|||
|
|||
@ApiModelProperty(value = "预警类型") |
|||
private String alarmType; |
|||
|
|||
@ApiModelProperty(value = "监测数据") |
|||
private String monitorData; |
|||
|
|||
@ApiModelProperty(value = "预警值") |
|||
private String alarmValue; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty(value = "预警时间") |
|||
private Date alarmTime; |
|||
|
|||
@ApiModelProperty(value = "预警状态") |
|||
private String alarmStatus; |
|||
|
|||
@ApiModelProperty(value = "告警处置") |
|||
private String alarmDisposal; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.kms.yg.cz.dto; |
|||
|
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@ApiModel("监测告警请求参数") |
|||
public class AlarmQueDto { |
|||
|
|||
@ApiModelProperty(value = "水库编码") |
|||
private String resCode; |
|||
|
|||
@JSONField(name = "START_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
@NotNull(message = "开始时间不能为空") |
|||
@ApiModelProperty(value = "开始时间", required = true) |
|||
private Date startTime; |
|||
|
|||
@JSONField(name = "END_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
@NotNull(message = "结束时间不能为空") |
|||
@ApiModelProperty(value = "结束时间", required = true) |
|||
private Date endTime; |
|||
|
|||
@ApiModelProperty(value = "页码") |
|||
private Integer pageSize = 10; |
|||
@ApiModelProperty(value = "每页条数") |
|||
private Integer pageNum = 1; |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.kms.yg.cz.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
|
|||
@ApiModel("测点查询Dto") |
|||
@Data |
|||
public class AttMpQueDto { |
|||
|
|||
@ApiModelProperty("水库编码") |
|||
private String resCode; |
|||
|
|||
@ApiModelProperty("测点类型") |
|||
private String mpType; |
|||
|
|||
} |
@ -0,0 +1,57 @@ |
|||
package com.kms.yg.cz.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
|
|||
@ApiModel("图表信息") |
|||
@Data |
|||
public class CharInfoDto { |
|||
@ApiModelProperty(value = "x轴") |
|||
private List<String> xAxis = Collections.emptyList(); |
|||
|
|||
@ApiModelProperty(value = "y轴") |
|||
private List<YAxis> yAxis = Collections.emptyList(); |
|||
; |
|||
|
|||
@ApiModelProperty(value = "标线") |
|||
private List<MarkLine> markLine = Collections.emptyList(); |
|||
; |
|||
|
|||
@Data |
|||
@ApiModel("y轴") |
|||
public static class YAxis { |
|||
@ApiModelProperty(value = "名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty(value = "单位") |
|||
private String unit; |
|||
|
|||
@ApiModelProperty(value = "数据") |
|||
private List<Series> series; |
|||
} |
|||
|
|||
@ApiModel("y轴数据") |
|||
@Data |
|||
public static class Series { |
|||
|
|||
@ApiModelProperty(value = "名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty(value = "数据") |
|||
private List<String> data; |
|||
} |
|||
|
|||
@ApiModel("标线") |
|||
@Data |
|||
public static class MarkLine { |
|||
@ApiModelProperty(value = "名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty(value = "值") |
|||
private String value; |
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.kms.yg.cz.dto; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@ApiModel("当前水情监测信息") |
|||
public class CurrentWaterMonitorDto { |
|||
|
|||
@ApiModelProperty(value = "当前库水位") |
|||
private String currentRz; |
|||
|
|||
@ApiModelProperty(value = "当前蓄水量") |
|||
private String currentW; |
|||
|
|||
@ApiModelProperty(value = "最大库水位") |
|||
private String maxRz; |
|||
|
|||
@ApiModelProperty(value = "最小库水位") |
|||
private String minRz; |
|||
|
|||
@ApiModelProperty(value = "平均库水位") |
|||
private String avgRz; |
|||
|
|||
@ApiModelProperty(value = "最大库水位时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date maxRzTime; |
|||
|
|||
@ApiModelProperty(value = "最小库水位时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date minRzTime; |
|||
|
|||
@ApiModelProperty(value = "日降雨量") |
|||
private String dyp; |
|||
|
|||
@ApiModelProperty(value = "平均降雨量") |
|||
private String avgDyp; |
|||
|
|||
@ApiModelProperty(value = "最大降雨量") |
|||
private String maxDyp; |
|||
|
|||
@ApiModelProperty(value = "最大降雨量时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date maxDypTime; |
|||
|
|||
|
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.kms.yg.cz.dto; |
|||
|
|||
import com.kms.yg.cz.enmu.MsgTypeEnum; |
|||
import com.kms.yxgh.common.dto.OperatorDto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@ApiModel("监测配置信息") |
|||
public class MonitorConfigDto { |
|||
|
|||
@ApiModelProperty("监测配置ID") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("水库编码") |
|||
private String resCode; |
|||
|
|||
@ApiModelProperty("水库名称") |
|||
private String resName; |
|||
|
|||
@ApiModelProperty("监测类型") |
|||
private String mpType; |
|||
|
|||
@ApiModelProperty("测站编码") |
|||
private String stcd; |
|||
|
|||
@ApiModelProperty("预警类型") |
|||
private String warnType; |
|||
|
|||
@ApiModelProperty("预警值") |
|||
private String warnValue; |
|||
|
|||
@ApiModelProperty("预警通知人") |
|||
private List<OperatorDto> warnOperators; |
|||
|
|||
@ApiModelProperty("预警通知方式") |
|||
private MsgTypeEnum msgType; |
|||
|
|||
@ApiModelProperty("信息模板") |
|||
private String msgTemplate; |
|||
|
|||
@ApiModelProperty("预警通知间隔") |
|||
private Integer warnInterval; |
|||
|
|||
@ApiModelProperty("预警时间单位") |
|||
private String warnTimeUnit; |
|||
|
|||
} |
@ -0,0 +1,59 @@ |
|||
package com.kms.yg.cz.enmu; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.kms.yg.cz.dto.CharInfoDto; |
|||
import com.kms.yg.sk.mapper.AttResRfkwlvMapper; |
|||
import com.kms.yg.sk.mapper.AttResRsppMapper; |
|||
import com.shuili.common.utils.SpringUtils; |
|||
import com.shuili.common.utils.StringUtils; |
|||
import lombok.Getter; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
@Getter |
|||
public enum MarkTypeEnum { |
|||
|
|||
FSLTDZ_LIMIT("汛限水位", "m", Constants.DEFAULT_KEY_FIELD, "rsltdz", AttResRfkwlvMapper.class), |
|||
CHFLLV("校准洪核水位", "m", Constants.DEFAULT_KEY_FIELD, "chfllv", AttResRsppMapper.class), |
|||
; |
|||
|
|||
private final String zhName; |
|||
private final String unit; |
|||
private final String keyField; |
|||
private final String valueField; |
|||
private final Class<? extends BaseMapper> clazz; |
|||
|
|||
MarkTypeEnum(String zhName, String unit, String keyField, String valueField, Class<? extends BaseMapper> clazz) { |
|||
this.zhName = zhName; |
|||
this.unit = unit; |
|||
this.keyField = keyField; |
|||
this.valueField = valueField; |
|||
this.clazz = clazz; |
|||
} |
|||
|
|||
|
|||
public CharInfoDto.MarkLine toMarkLine(String code) { |
|||
CharInfoDto.MarkLine markLine = new CharInfoDto.MarkLine(); |
|||
markLine.setName(zhName + "(" + unit + ")"); |
|||
markLine.setValue("0"); |
|||
if (StringUtils.isEmpty(code)) { |
|||
return markLine; |
|||
} |
|||
BaseMapper mapper = SpringUtils.getBean(clazz); |
|||
List<Map<String, Object>> results = mapper.selectMaps(new QueryWrapper<>().select(valueField).eq(keyField, code)); |
|||
if (!results.isEmpty()) { |
|||
Map<String, Object> result = results.get(0); |
|||
String value = result.get(valueField).toString(); |
|||
if (StringUtils.isNotBlank(value)) { |
|||
markLine.setValue(value); |
|||
} |
|||
} |
|||
return markLine; |
|||
} |
|||
|
|||
public final static class Constants { |
|||
public static final String DEFAULT_KEY_FIELD = "ID"; |
|||
} |
|||
} |
@ -0,0 +1,151 @@ |
|||
package com.kms.yg.cz.enmu; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import com.kms.yg.cz.dto.CharInfoDto; |
|||
import com.kms.yg.cz.dto.MonitorQueDto; |
|||
import com.shuili.common.utils.DateUtils; |
|||
import com.shuili.common.utils.StringUtils; |
|||
import lombok.Getter; |
|||
import org.apache.commons.collections4.KeyValue; |
|||
import org.apache.commons.collections4.keyvalue.DefaultKeyValue; |
|||
|
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
import java.util.stream.Stream; |
|||
|
|||
import static com.shuili.common.utils.DateUtils.YYYY_MM_DD_HH_MM_SS; |
|||
|
|||
|
|||
@Getter |
|||
public enum MonitorComposeEnum { |
|||
|
|||
WATER_LEVEL(Collections.singletonList(MonitorTypeEnum.RAINFALL), Collections.singletonList(MonitorTypeEnum.WATER_LEVEL)), |
|||
ENV(Collections.singletonList(MonitorTypeEnum.AIR_TEMPE), "坝址气温", Collections.singletonList(MonitorTypeEnum.WATER_TEMPE), "库水温"), |
|||
; |
|||
|
|||
private final List<MonitorTypeEnum> leftElements; |
|||
private final String leftName; |
|||
private final String leftUnit; |
|||
private final List<MonitorTypeEnum> rightElements; |
|||
private final String rightName; |
|||
private final String rightUnit; |
|||
|
|||
MonitorComposeEnum(List<MonitorTypeEnum> leftElements, List<MonitorTypeEnum> rightElements) { |
|||
this.leftElements = leftElements; |
|||
this.rightElements = rightElements; |
|||
this.leftName = CollectionUtil.isEmpty(this.leftElements) ? "" : this.leftElements.get(0).getZhName(); |
|||
this.rightName = CollectionUtil.isEmpty(this.rightElements) ? "" : this.rightElements.get(0).getZhName(); |
|||
this.leftUnit = CollectionUtil.isEmpty(this.leftElements) ? "" : this.leftElements.get(0).getUnit(); |
|||
this.rightUnit = CollectionUtil.isEmpty(this.rightElements) ? "" : this.rightElements.get(0).getUnit(); |
|||
} |
|||
|
|||
MonitorComposeEnum(List<MonitorTypeEnum> leftElements, List<MonitorTypeEnum> rightElements, String rightName) { |
|||
this.leftElements = leftElements; |
|||
this.rightElements = rightElements; |
|||
this.leftName = CollectionUtil.isEmpty(this.leftElements) ? "" : this.leftElements.get(0).getZhName(); |
|||
this.rightName = rightName; |
|||
this.leftUnit = CollectionUtil.isEmpty(this.leftElements) ? "" : this.leftElements.get(0).getUnit(); |
|||
this.rightUnit = CollectionUtil.isEmpty(this.rightElements) ? "" : this.rightElements.get(0).getUnit(); |
|||
} |
|||
|
|||
MonitorComposeEnum(List<MonitorTypeEnum> leftElements, String leftName, List<MonitorTypeEnum> rightElements) { |
|||
this.leftElements = leftElements; |
|||
this.rightElements = rightElements; |
|||
this.leftName = leftName; |
|||
this.rightName = CollectionUtil.isEmpty(this.rightElements) ? "" : this.rightElements.get(0).getZhName(); |
|||
this.leftUnit = CollectionUtil.isEmpty(this.leftElements) ? "" : this.leftElements.get(0).getUnit(); |
|||
this.rightUnit = CollectionUtil.isEmpty(this.rightElements) ? "" : this.rightElements.get(0).getUnit(); |
|||
} |
|||
|
|||
MonitorComposeEnum(List<MonitorTypeEnum> leftElements, String leftName, List<MonitorTypeEnum> rightElements, String rightName) { |
|||
this.leftElements = leftElements; |
|||
this.rightElements = rightElements; |
|||
this.leftName = leftName; |
|||
this.rightName = rightName; |
|||
this.leftUnit = CollectionUtil.isEmpty(this.leftElements) ? "" : this.leftElements.get(0).getUnit(); |
|||
this.rightUnit = CollectionUtil.isEmpty(this.rightElements) ? "" : this.rightElements.get(0).getUnit(); |
|||
} |
|||
|
|||
MonitorComposeEnum(List<MonitorTypeEnum> leftElements, String leftName, String leftUnit, List<MonitorTypeEnum> rightElements, String rightName, String rightUnit) { |
|||
this.leftElements = leftElements; |
|||
this.rightElements = rightElements; |
|||
this.leftName = leftName; |
|||
this.rightName = rightName; |
|||
this.leftUnit = leftUnit; |
|||
this.rightUnit = rightUnit; |
|||
} |
|||
|
|||
|
|||
public CharInfoDto toChar(Map<MonitorSourceEnum, List<Map<String, Object>>> dataMap, MonitorQueDto sp) { |
|||
CharInfoDto charInfoDto = new CharInfoDto(); |
|||
charInfoDto.setXAxis(Stream.concat(this.leftElements.stream(), this.rightElements.stream()) |
|||
.flatMap(type -> { |
|||
MonitorSourceEnum source = type.getSource(); |
|||
return dataMap.get(source).stream().map(map -> map.get(type.getTimeField())); |
|||
} |
|||
).filter(Objects::nonNull) |
|||
.filter(item -> item instanceof Date) |
|||
.map(item -> (Date) item) |
|||
.map(date -> DateUtils.parseDateToStr(YYYY_MM_DD_HH_MM_SS, date)) |
|||
.sorted() |
|||
.collect(Collectors.toList())); |
|||
List<CharInfoDto.YAxis> yAxis = new ArrayList<>(); |
|||
|
|||
if (CollectionUtil.isNotEmpty(this.leftElements)) { |
|||
CharInfoDto.YAxis left = new CharInfoDto.YAxis(); |
|||
left.setName(this.leftName); |
|||
left.setUnit(this.leftUnit); |
|||
left.setSeries(getCollect(this.leftElements, this.leftName, dataMap, charInfoDto)); |
|||
yAxis.add(left); |
|||
} |
|||
if (CollectionUtil.isNotEmpty(this.rightElements)) { |
|||
CharInfoDto.YAxis right = new CharInfoDto.YAxis(); |
|||
right.setName(this.rightName); |
|||
right.setUnit(this.rightUnit); |
|||
right.setSeries(getCollect(this.rightElements, this.rightName, dataMap, charInfoDto)); |
|||
yAxis.add(right); |
|||
} |
|||
charInfoDto.setYAxis(yAxis); |
|||
charInfoDto.setMarkLine(Stream.concat(this.leftElements.stream(), this.rightElements.stream()) |
|||
.map(MonitorTypeEnum::getMarkType) |
|||
.filter(Objects::nonNull) |
|||
.map(markType -> markType.toMarkLine(sp.getResCode())) |
|||
.collect(Collectors.toList())); |
|||
return charInfoDto; |
|||
} |
|||
|
|||
private List<CharInfoDto.Series> getCollect(List<MonitorTypeEnum> element, String name, Map<MonitorSourceEnum, List<Map<String, Object>>> dataMap, CharInfoDto charInfoDto) { |
|||
return element.stream() |
|||
.map(type -> { |
|||
CharInfoDto.Series series = new CharInfoDto.Series(); |
|||
series.setName(name); |
|||
MonitorSourceEnum source = type.getSource(); |
|||
Map<String, Object> values = dataMap.get(source).stream() |
|||
.map(map -> { |
|||
Object time = map.get(type.getTimeField()); |
|||
if (time instanceof Date) { |
|||
DefaultKeyValue<String, Object> keyValue = new DefaultKeyValue<>(); |
|||
keyValue.setKey(DateUtils.parseDateToStr(YYYY_MM_DD_HH_MM_SS, (Date) time)); |
|||
keyValue.setValue(map.get(type.getValueField())); |
|||
return keyValue; |
|||
} |
|||
return null; |
|||
}) |
|||
.filter(Objects::nonNull) |
|||
.collect(Collectors.toMap(KeyValue::getKey, KeyValue::getValue, (v1, v2) -> v2)); |
|||
series.setData(charInfoDto.getXAxis().stream() |
|||
.map(time -> { |
|||
Object value = values.get(time); |
|||
return value == null || StringUtils.isEmpty(value.toString()) ? "0" : value.toString(); |
|||
}).collect(Collectors.toList())); |
|||
return series; |
|||
}).collect(Collectors.toList()); |
|||
} |
|||
|
|||
public static MonitorComposeEnum getEnum(String name) { |
|||
return Arrays.stream(MonitorComposeEnum.values()) |
|||
.filter(item -> item.name().equals(name)) |
|||
.findFirst() |
|||
.orElse(null); |
|||
} |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.kms.yg.cz.enmu; |
|||
|
|||
import lombok.Getter; |
|||
|
|||
@Getter |
|||
public enum MonitorTypeEnum { |
|||
WATER_LEVEL("水位", MonitorSourceEnum.MS_HDM_RSVR, "rz", "collTime", "m", MarkTypeEnum.FSLTDZ_LIMIT), |
|||
RAINFALL("降雨量", MonitorSourceEnum.MS_HDM_OBP, "drp", "collTime", "mm", MarkTypeEnum.CHFLLV), |
|||
AIR_TEMPE("气温", MonitorSourceEnum.MS_DSM_ENV, "aitp", "tm", "℃"), |
|||
WATER_TEMPE("水温", MonitorSourceEnum.MS_DSM_ENV, "ctp", "tm", "℃"), |
|||
UPLIFTED_PRESSURE("扬压力", MonitorSourceEnum.MS_DSM_PTMP, "upliftedPressure", "mstm", "MPa"), |
|||
PERMEABILITY_PRESSURE("渗透压力", MonitorSourceEnum.MS_DSM_SPPR, "spprwl", "mstm", "MPa"), |
|||
|
|||
; |
|||
|
|||
private final String zhName; |
|||
private final MonitorSourceEnum source; |
|||
private final String valueField; |
|||
private final String timeField; |
|||
private final String unit; |
|||
private final MarkTypeEnum markType; |
|||
|
|||
MonitorTypeEnum(String zhName, MonitorSourceEnum source, String valueField, String timeField, String unit) { |
|||
this(zhName, source, valueField, timeField, unit, null); |
|||
} |
|||
|
|||
MonitorTypeEnum(String zhName, MonitorSourceEnum source, String valueField, String timeField, String unit, MarkTypeEnum markType) { |
|||
this.zhName = zhName; |
|||
this.source = source; |
|||
this.valueField = valueField; |
|||
this.unit = unit; |
|||
this.markType = markType; |
|||
this.timeField = timeField; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.kms.yg.cz.enmu; |
|||
|
|||
import lombok.Getter; |
|||
|
|||
@Getter |
|||
public enum MsgTypeEnum { |
|||
//站内信,短信
|
|||
SITE_MSG(1, "站内信"), |
|||
SMS_MSG(2, "短信"); |
|||
|
|||
private final Integer code; |
|||
private final String msg; |
|||
|
|||
MsgTypeEnum(Integer code, String msg) { |
|||
this.code = code; |
|||
this.msg = msg; |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.kms.yg.cz.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.kms.yg.cz.domain.AlarmInfo; |
|||
import com.kms.yg.cz.domain.AttStBase; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
|
|||
/** |
|||
* 【请填写功能名称】Mapper接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@Repository |
|||
public interface AlarmInfoMapper extends BaseMapper<AlarmInfo> { |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.kms.yg.cz.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.kms.yg.cz.domain.AlarmInfo; |
|||
import com.kms.yg.cz.domain.MonitorConfig; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
|
|||
/** |
|||
* 【请填写功能名称】Mapper接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@Repository |
|||
public interface MonitorConfigMapper extends BaseMapper<MonitorConfig> { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.kms.yg.cz.service; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.kms.yg.cz.domain.AlarmInfo; |
|||
import com.kms.yg.cz.dto.AlarmInfoDto; |
|||
import com.kms.yg.cz.dto.AlarmQueDto; |
|||
import com.kms.yg.cz.mapper.AlarmInfoMapper; |
|||
import com.kms.yxgh.util.BeanCopyUtils; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
|
|||
@Service |
|||
@Slf4j |
|||
public class AlarmService { |
|||
|
|||
@Autowired |
|||
private AlarmInfoMapper alarmInfoMapper; |
|||
|
|||
public IPage<AlarmInfoDto> pageQuery(AlarmQueDto sp) { |
|||
Page<AlarmInfo> page = new Page<>(sp.getPageNum(), sp.getPageSize()); |
|||
Wrapper<AlarmInfo> wrapper = Wrappers.<AlarmInfo>lambdaQuery() |
|||
.between(AlarmInfo::getAlarmTime, sp.getStartTime(), sp.getEndTime()) |
|||
.eq(AlarmInfo::getResCode, sp.getResCode()); |
|||
IPage<AlarmInfo> result = alarmInfoMapper.selectPage(page, wrapper); |
|||
return new Page<AlarmInfoDto>(result.getCurrent(), result.getSize(), result.getTotal()) |
|||
.setRecords(BeanCopyUtils.copyList(result.getRecords(), AlarmInfoDto.class)); |
|||
} |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.kms.yg.sk.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.shuili.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@TableName("att_res_code") |
|||
@Data |
|||
@ApiModel("水库编码信息") |
|||
public class AttResCode extends BaseEntity { |
|||
|
|||
@ApiModelProperty("水库编码") |
|||
private String resCode; |
|||
|
|||
@ApiModelProperty("主测站编码") |
|||
private String stcd; |
|||
|
|||
@TableField(exist = false) |
|||
private String remark; |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.kms.yg.sk.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.shuili.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@TableName("att_res_rfkwlv") |
|||
@Data |
|||
public class AttResRfkwlv extends BaseEntity { |
|||
|
|||
@ApiModelProperty("水库代码") |
|||
private String resCode; |
|||
|
|||
@ApiModelProperty("开启年份") |
|||
private String actyr; |
|||
|
|||
@ApiModelProperty("开启日期") |
|||
private String bgmd; |
|||
|
|||
@ApiModelProperty("汛限水位") |
|||
private String rsltdz; |
|||
|
|||
@ApiModelProperty("结束日期") |
|||
private String edmd; |
|||
|
|||
@ApiModelProperty("汛限库容") |
|||
private String flstdw; |
|||
|
|||
@ApiModelProperty("启用标识") |
|||
private String enableFlag; |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String note; |
|||
|
|||
@TableField(exist = false) |
|||
private String remark; |
|||
|
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.kms.yg.sk.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.kms.yg.sk.domain.AttResCode; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
|
|||
/** |
|||
* 【请填写功能名称】Mapper接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@Repository |
|||
public interface AttResCodeMapper extends BaseMapper<AttResCode> { |
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.kms.yg.sk.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.kms.yg.sk.domain.AttResRfkwlv; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
|
|||
/** |
|||
* 【请填写功能名称】Mapper接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@Repository |
|||
public interface AttResRfkwlvMapper extends BaseMapper<AttResRfkwlv> { |
|||
|
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.kms.yg.sk.service; |
|||
|
|||
import com.kms.yg.sk.domain.AttResBase; |
|||
import com.kms.yg.sk.domain.AttResCode; |
|||
import com.kms.yg.sk.mapper.AttResBaseMapper; |
|||
import com.kms.yg.sk.mapper.AttResCodeMapper; |
|||
import com.shuili.common.core.service.BaseService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 【请填写功能名称】Service接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@Service |
|||
public class AttResCodeService extends BaseService<AttResCodeMapper, AttResCode>{ |
|||
|
|||
} |
@ -0,0 +1,89 @@ |
|||
package com.kms.yxgh.base.domain.monitor; |
|||
|
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@TableName("ms_dsm_insmonrec") |
|||
@Data |
|||
@ApiModel("惯导监测表") |
|||
public class MsDsmInsmonrec { |
|||
|
|||
@ApiModelProperty("水利工程测站代码") |
|||
@JSONField(name = "PRJ_STCD") |
|||
private String prjStcd; |
|||
|
|||
@ApiModelProperty("测点编号") |
|||
@JSONField(name = "MPCD") |
|||
private String mpcd; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("时间") |
|||
@JSONField(name = "TM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date tm; |
|||
|
|||
@ApiModelProperty("X方向加速度") |
|||
@JSONField(name = "ACC_X") |
|||
private String accX; |
|||
|
|||
@ApiModelProperty("Y方向加速度") |
|||
@JSONField(name = "ACC_Y") |
|||
private String accY; |
|||
|
|||
@ApiModelProperty("Z方向加速度") |
|||
@JSONField(name = "ACC_Z") |
|||
private String accZ; |
|||
|
|||
@ApiModelProperty("X方向角度") |
|||
@JSONField(name = "ANG_X") |
|||
private String angX; |
|||
|
|||
@ApiModelProperty("Y方向角度") |
|||
@JSONField(name = "ANG_Y") |
|||
private String angY; |
|||
|
|||
@ApiModelProperty("Z方向角度") |
|||
@JSONField(name = "ANG_Z") |
|||
private String angZ; |
|||
|
|||
@ApiModelProperty("温度") |
|||
@JSONField(name = "TEMP") |
|||
private String temp; |
|||
|
|||
@ApiModelProperty("采集方式") |
|||
@JSONField(name = "COLMT") |
|||
private String colmt; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("级联时间") |
|||
@JSONField(name = "CONN_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date connTime; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("采集时间") |
|||
@JSONField(name = "COLL_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date collTime; |
|||
|
|||
@ApiModelProperty("数据来源") |
|||
@JSONField(name = "GDWR_DASC") |
|||
private String gdwrDasc; |
|||
|
|||
@ApiModelProperty("置信度") |
|||
@JSONField(name = "RELIABILITY") |
|||
private String reliability; |
|||
|
|||
@ApiModelProperty("指令ID") |
|||
@JSONField(name = "COMMAND_ID") |
|||
private String commandId; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("入库时间") |
|||
@JSONField(name = "CREATE_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date createTime; |
|||
|
|||
} |
@ -0,0 +1,81 @@ |
|||
package com.kms.yxgh.base.domain.monitor; |
|||
|
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@TableName("ms_dsm_ptmp") |
|||
@Data |
|||
@ApiModel("测压管(计)水位监测表") |
|||
public class MsDsmPtmp { |
|||
|
|||
@ApiModelProperty("水利工程测站代码") |
|||
@JSONField(name = "PRJ_STCD") |
|||
private String prjStcd; |
|||
|
|||
@ApiModelProperty("测点编号") |
|||
@JSONField(name = "MPCD") |
|||
private String mpcd; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("测量时间") |
|||
@JSONField(name = "MSTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date pstm; |
|||
|
|||
@ApiModelProperty("测压管水位") |
|||
@JSONField(name = "PZTBWL") |
|||
private String pztbwl; |
|||
|
|||
@ApiModelProperty("扬压力") |
|||
@JSONField(name = "UPLIFTED_PRESSURE") |
|||
private String upliftedPressure; |
|||
|
|||
@ApiModelProperty("绕坝渗流") |
|||
@JSONField(name = "BYPASS_SEEPAGE") |
|||
private String bypassSeepage; |
|||
|
|||
@ApiModelProperty("频模") |
|||
@JSONField(name = "FM") |
|||
private String fm; |
|||
|
|||
@ApiModelProperty("温度") |
|||
@JSONField(name = "TEMP") |
|||
private String temp; |
|||
|
|||
@ApiModelProperty("采集方式") |
|||
@JSONField(name = "COLMT") |
|||
private String colmt; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("级联时间") |
|||
@JSONField(name = "CONN_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date connTime; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("采集时间") |
|||
@JSONField(name = "COLL_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date collTime; |
|||
|
|||
@ApiModelProperty("数据来源") |
|||
@JSONField(name = "GDWR_DASC") |
|||
private String gdwrDasc; |
|||
|
|||
@ApiModelProperty("置信度") |
|||
@JSONField(name = "RELIABILITY") |
|||
private String reliability; |
|||
|
|||
@ApiModelProperty("指令ID") |
|||
@JSONField(name = "COMMAND_ID") |
|||
private String commandId; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("入库时间") |
|||
@JSONField(name = "CREATE_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date createTime; |
|||
|
|||
} |
@ -1,115 +1,72 @@ |
|||
package com.kms.yxgh.base.domain.monitor; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.base.SyBaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@TableName("ms_dsm_sppr") |
|||
@Data |
|||
@ApiModel("渗流压力水位监测表") |
|||
public class MsHdmSppr extends SyBaseEntity { |
|||
public class MsDsmSppr { |
|||
|
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 水利工程测站代码 |
|||
*/ |
|||
@ApiModelProperty("水利工程测站代码") |
|||
@TableField("PRJ_STCD") |
|||
@JSONField(name = "PRJ_STCD") |
|||
private String prjStcd; |
|||
|
|||
/** |
|||
* 测点编号 |
|||
*/ |
|||
@ApiModelProperty("测点编号") |
|||
@TableField("MPCD") |
|||
@JSONField(name = "MPCD") |
|||
private String mpcd; |
|||
|
|||
/** |
|||
* 测量时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("测量时间") |
|||
@TableField("MSTM") |
|||
@JSONField(name = "MSTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date mstm; |
|||
|
|||
/** |
|||
* 温度(℃) |
|||
*/ |
|||
@ApiModelProperty("温度(℃)") |
|||
@TableField("TMP") |
|||
private BigDecimal tmp; |
|||
/** |
|||
* 渗流压力水位(m) |
|||
*/ |
|||
@JSONField(name = "TMP") |
|||
private String tmp; |
|||
|
|||
@ApiModelProperty("渗流压力水位(m)") |
|||
@TableField("SPPRWL") |
|||
private BigDecimal spprwl; |
|||
@JSONField(name = "SPPRWL") |
|||
private String spprwl; |
|||
|
|||
/** |
|||
* 采集方式 |
|||
*/ |
|||
@ApiModelProperty("采集方式") |
|||
@TableField("COLMT") |
|||
@JSONField(name = "COLMT") |
|||
private String colmt; |
|||
|
|||
/** |
|||
* 机构代码 |
|||
*/ |
|||
@ApiModelProperty("机构代码") |
|||
@TableField("GDWR_OGID") |
|||
@JSONField(name = "GDWR_OGID") |
|||
private String gdwrOgid; |
|||
|
|||
/** |
|||
* 级联时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("级联时间") |
|||
@TableField("CONN_TIME") |
|||
@JSONField(name = "CONN_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date connTime; |
|||
|
|||
/** |
|||
* 采集时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("采集时间") |
|||
@TableField("COLL_TIME") |
|||
@JSONField(name = "COLL_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date collTime; |
|||
|
|||
/** |
|||
* 数据来源 |
|||
*/ |
|||
@ApiModelProperty("数据来源") |
|||
@TableField("GDWR_DASC") |
|||
@JSONField(name = "GDWR_DASC") |
|||
private String gdwrDasc; |
|||
|
|||
/** |
|||
* 置信度 |
|||
*/ |
|||
@ApiModelProperty("置信度") |
|||
@TableField("RELIABILITY") |
|||
@JSONField(name = "RELIABILITY") |
|||
private String reliability; |
|||
|
|||
/** |
|||
* 指令ID |
|||
*/ |
|||
@ApiModelProperty("指令ID") |
|||
@TableField("COMMAND_ID") |
|||
@JSONField(name = "COMMAND_ID") |
|||
private String commandId; |
|||
|
|||
/** |
|||
* 入库时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("入库时间") |
|||
@TableField("CREATE_TIME") |
|||
@JSONField(name = "CREATE_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date createTime; |
|||
} |
@ -1,100 +1,65 @@ |
|||
package com.kms.yxgh.base.domain.monitor; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.base.SyBaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@TableName("ms_hdm_pstat") |
|||
@Data |
|||
@ApiModel("降水量统计表") |
|||
public class MsHdmPstat extends SyBaseEntity { |
|||
public class MsHdmPstat { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 测站编码 |
|||
*/ |
|||
@ApiModelProperty("测站编码") |
|||
@TableField("STCD") |
|||
@JSONField(name = "STCD") |
|||
private String stcd; |
|||
|
|||
/** |
|||
* 标志时间 |
|||
*/ |
|||
@ApiModelProperty("标志时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@TableField("IDTM") |
|||
@JSONField(name = "IDTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date idtm; |
|||
|
|||
/** |
|||
* 统计时段标志 |
|||
*/ |
|||
@ApiModelProperty("统计时段标志") |
|||
@TableField("STTDRCD") |
|||
@JSONField(name = "STTDRCD") |
|||
private String sttdrcd; |
|||
|
|||
/** |
|||
* 累计降水量(mm) |
|||
*/ |
|||
@ApiModelProperty("累计降水量(mm)") |
|||
@TableField("ACCP") |
|||
private BigDecimal accp; |
|||
/** |
|||
* 采集方式 |
|||
*/ |
|||
@JSONField(name = "ACCP") |
|||
private String accp; |
|||
|
|||
@ApiModelProperty("采集方式") |
|||
@TableField("COLMT") |
|||
@JSONField(name = "COLMT") |
|||
private String colmt; |
|||
|
|||
/** |
|||
* 级联时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("级联时间") |
|||
@TableField("CONN_TIME") |
|||
@JSONField(name = "CONN_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date connTime; |
|||
|
|||
/** |
|||
* 采集时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("采集时间") |
|||
@TableField("COLL_TIME") |
|||
@JSONField(name = "COLL_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date collTime; |
|||
|
|||
/** |
|||
* 数据来源 |
|||
*/ |
|||
@ApiModelProperty("数据来源") |
|||
@TableField("GDWR_DASC") |
|||
@JSONField(name = "GDWR_DASC") |
|||
private String gdwrDasc; |
|||
|
|||
/** |
|||
* 置信度 |
|||
*/ |
|||
@ApiModelProperty("置信度") |
|||
@TableField("RELIABILITY") |
|||
@JSONField(name = "RELIABILITY") |
|||
private String reliability; |
|||
|
|||
/** |
|||
* 指令ID |
|||
*/ |
|||
@ApiModelProperty("指令ID") |
|||
@TableField("COMMAND_ID") |
|||
@JSONField(name = "COMMAND_ID") |
|||
private String commandId; |
|||
|
|||
/** |
|||
* 入库时间 |
|||
*/ |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("入库时间") |
|||
@TableField("CREATE_TIME") |
|||
@JSONField(name = "CREATE_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date createTime; |
|||
} |
|||
|
@ -0,0 +1,110 @@ |
|||
package com.kms.yxgh.base.domain.monitor; |
|||
|
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@TableName("ms_hdm_rsvrav") |
|||
@Data |
|||
@ApiModel("水库水情多日均值表") |
|||
public class MsHdmRsvrav { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 测站编码 |
|||
*/ |
|||
@ApiModelProperty("测站编码") |
|||
@JSONField(name = "STCD") |
|||
private String stcd; |
|||
|
|||
/** |
|||
* 时间 |
|||
*/ |
|||
@ApiModelProperty("标志时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JSONField(name = "IDTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date idtm; |
|||
|
|||
/** |
|||
* 库上水位(m) |
|||
*/ |
|||
@ApiModelProperty("平均库上水位(m)") |
|||
@JSONField(name = "AVRZ") |
|||
private String avrz; |
|||
|
|||
/** |
|||
* 入库流量(m³/s) |
|||
*/ |
|||
@ApiModelProperty("平均入库流量(m³/s)") |
|||
@JSONField(name = "AVINQ") |
|||
private String avinq; |
|||
|
|||
@ApiModelProperty("平均出库流量(m³/s)") |
|||
@JSONField(name = "AVOTQ") |
|||
private String avotq; |
|||
|
|||
/** |
|||
* 蓄水量 |
|||
*/ |
|||
@ApiModelProperty("平均蓄水量") |
|||
@JSONField(name = "AVW") |
|||
private String avw; |
|||
|
|||
/** |
|||
* 采集方式 |
|||
*/ |
|||
@ApiModelProperty("采集方式") |
|||
@JSONField(name = "COLMT") |
|||
private String colmt; |
|||
|
|||
/** |
|||
* 级联时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("级联时间") |
|||
@JSONField(name = "CONN_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date connTime; |
|||
|
|||
/** |
|||
* 采集时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("采集时间") |
|||
@JSONField(name = "COLL_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date collTime; |
|||
|
|||
/** |
|||
* 数据来源 |
|||
*/ |
|||
@ApiModelProperty("数据来源") |
|||
@JSONField(name = "GDWR_DASC") |
|||
private String gdwrDasc; |
|||
|
|||
/** |
|||
* 置信度 |
|||
*/ |
|||
@ApiModelProperty("置信度") |
|||
@JSONField(name = "RELIABILITY") |
|||
private String reliability; |
|||
|
|||
/** |
|||
* 指令ID |
|||
*/ |
|||
@ApiModelProperty("指令ID") |
|||
@JSONField(name = "COMMAND_ID") |
|||
private String commandId; |
|||
|
|||
/** |
|||
* 入库时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("入库时间") |
|||
@JSONField(name = "CREATE_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date createTime; |
|||
} |
@ -0,0 +1,156 @@ |
|||
package com.kms.yxgh.base.domain.monitor; |
|||
|
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@TableName("ms_hdm_rsvrevs") |
|||
@Data |
|||
@ApiModel("水库水情极值表") |
|||
public class MsHdmRsvrevs { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 测站编码 |
|||
*/ |
|||
@ApiModelProperty("测站编码") |
|||
@JSONField(name = "STCD") |
|||
private String stcd; |
|||
|
|||
/** |
|||
* 时间 |
|||
*/ |
|||
@ApiModelProperty("标志时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JSONField(name = "IDTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date idtm; |
|||
|
|||
@ApiModelProperty("统计时段标志") |
|||
@JSONField(name = "STTDRCD") |
|||
private String sttdrcd; |
|||
|
|||
@ApiModelProperty("最高库上水位(m)") |
|||
@JSONField(name = "HTRZ") |
|||
private String htrz; |
|||
|
|||
@ApiModelProperty("最低库上水位(m)") |
|||
@JSONField(name = "LTRZ") |
|||
private String ltrz; |
|||
|
|||
@ApiModelProperty("最大入库流量(m³/s)") |
|||
@JSONField(name = "MXINQ") |
|||
private String mxinq; |
|||
|
|||
@ApiModelProperty("最小入库流量(m³/s)") |
|||
@JSONField(name = "MNINQ") |
|||
private String mninq; |
|||
|
|||
@ApiModelProperty("最大出库流量(m³/s)") |
|||
@JSONField(name = "MXOTQ") |
|||
private String mxotq; |
|||
|
|||
@ApiModelProperty("最小出库流量(m³/s)") |
|||
@JSONField(name = "MNOTQ") |
|||
private String mnotq; |
|||
|
|||
@ApiModelProperty("最大蓄水量") |
|||
@JSONField(name = "MXW") |
|||
private String mxw; |
|||
|
|||
@ApiModelProperty("最小蓄水量") |
|||
@JSONField(name = "MNW") |
|||
private String mnw; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("最高库水位出现时间") |
|||
@JSONField(name = "HTRZTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date htrztm; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("最低库水位出现时间") |
|||
@JSONField(name = "LTRZTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date ltrztm; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("最大入库流量出现时间") |
|||
@JSONField(name = "MXINQTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date mxinqtm; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("最小入库流量出现时间") |
|||
@JSONField(name = "MNINQTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date mninqtm; |
|||
|
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("最大出库流量出现时间") |
|||
@JSONField(name = "MXOTQTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date mxotqtm; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("最小出库流量出现时间") |
|||
@JSONField(name = "MNOTQTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date mnotqtm; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("最大蓄水量出现时间") |
|||
@JSONField(name = "MXWTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date mxwtm; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("最小蓄水量出现时间") |
|||
@JSONField(name = "MNWTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date mnwtm; |
|||
|
|||
@ApiModelProperty("采集方式") |
|||
@JSONField(name = "COLMT") |
|||
private String colmt; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("级联时间") |
|||
@JSONField(name = "CONN_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date connTime; |
|||
|
|||
/** |
|||
* 采集时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("采集时间") |
|||
@JSONField(name = "COLL_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date collTime; |
|||
|
|||
/** |
|||
* 数据来源 |
|||
*/ |
|||
@ApiModelProperty("数据来源") |
|||
@JSONField(name = "GDWR_DASC") |
|||
private String gdwrDasc; |
|||
|
|||
/** |
|||
* 置信度 |
|||
*/ |
|||
@ApiModelProperty("置信度") |
|||
@JSONField(name = "RELIABILITY") |
|||
private String reliability; |
|||
|
|||
/** |
|||
* 指令ID |
|||
*/ |
|||
@ApiModelProperty("指令ID") |
|||
@JSONField(name = "COMMAND_ID") |
|||
private String commandId; |
|||
|
|||
/** |
|||
* 入库时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("入库时间") |
|||
@JSONField(name = "CREATE_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date createTime; |
|||
} |
@ -0,0 +1,100 @@ |
|||
package com.kms.yxgh.base.domain.monitor; |
|||
|
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@TableName("ms_hdm_tmpevs") |
|||
@Data |
|||
@ApiModel("气温水温极值表") |
|||
public class MsHdmTmpevs { |
|||
|
|||
@ApiModelProperty("测站编号") |
|||
@JSONField(name = "STCD") |
|||
private String stcd; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("标志时间") |
|||
@JSONField(name = "IDTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date idtm; |
|||
|
|||
@ApiModelProperty("统计时段标志") |
|||
@JSONField(name = "STTDRCD") |
|||
private String sttdrcd; |
|||
|
|||
@ApiModelProperty("最高气温(℃)") |
|||
@JSONField(name = "MXATMP") |
|||
private String mxatmp; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("最高气温时间") |
|||
@JSONField(name = "MXATMPTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date mxatmptm; |
|||
|
|||
@ApiModelProperty("最低气温(℃)") |
|||
@JSONField(name = "MNATMP") |
|||
private String mnatmp; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("最低气温时间") |
|||
@JSONField(name = "MNATMPTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date mnatmptm; |
|||
|
|||
@ApiModelProperty("最高水温(℃)") |
|||
@JSONField(name = "MXWTMP") |
|||
private String mxwtmp; |
|||
|
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("最高水温时间") |
|||
@JSONField(name = "MXWTMPTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date mxwtmptm; |
|||
|
|||
@ApiModelProperty("最低水温(℃)") |
|||
@JSONField(name = "MNWTMP") |
|||
private String mnwtmp; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("最低水温时间") |
|||
@JSONField(name = "MNWTMPTM", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date mnwtmptm; |
|||
|
|||
|
|||
|
|||
@ApiModelProperty("采集方式") |
|||
@JSONField(name = "COLMT") |
|||
private String colmt; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("级联时间") |
|||
@JSONField(name = "CONN_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date connTime; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("采集时间") |
|||
@JSONField(name = "COLL_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date collTime; |
|||
|
|||
@ApiModelProperty("数据来源") |
|||
@JSONField(name = "GDWR_DASC") |
|||
private String gdwrDasc; |
|||
|
|||
@ApiModelProperty("置信度") |
|||
@JSONField(name = "RELIABILITY") |
|||
private String reliability; |
|||
|
|||
@ApiModelProperty("指令ID") |
|||
@JSONField(name = "COMMAND_ID") |
|||
private String commandId; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("入库时间") |
|||
@JSONField(name = "CREATE_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
private Date createTime; |
|||
|
|||
} |
@ -0,0 +1,84 @@ |
|||
SET NAMES utf8mb4; |
|||
|
|||
CREATE TABLE `bs_sgc_st_mon` ( |
|||
`STCD` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '测站编码', |
|||
`MON_PROJ` VARCHAR(50) COLLATE utf8mb4_general_ci COMMENT '测站监测要素', |
|||
`CREATE_UID` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人', |
|||
`CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间', |
|||
`UPDATE_UID` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最近修改人', |
|||
`UPDATE_TIME` datetime DEFAULT NULL COMMENT '最近修改时间' |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='水文水工程测站监测要素'; |
|||
|
|||
CREATE INDEX bs_sgc_st_mon_STCD_IDX USING BTREE ON bs_sgc_st_mon (STCD); |
|||
|
|||
|
|||
CREATE TABLE `att_res_code` ( |
|||
`ID` VARCHAR(30) COLLATE utf8mb4_general_ci COMMENT '主键', |
|||
`RES_CODE` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '水库编码', |
|||
`STCD` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '测站编码', |
|||
`CREATE_UID` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人', |
|||
`CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间', |
|||
`UPDATE_UID` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最近修改人', |
|||
`UPDATE_TIME` datetime DEFAULT NULL COMMENT '最近修改时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='水库编码信息'; |
|||
|
|||
CREATE TABLE `att_res_rfkwlv` ( |
|||
`ID` VARCHAR(30) COLLATE utf8mb4_general_ci COMMENT '主键', |
|||
`RES_CODE` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '水库编码', |
|||
`ACTYR` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '开启年份', |
|||
`BGMD` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '开启日期', |
|||
`RSLTDZ` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '汛限水位', |
|||
`EDMD` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '结束日期', |
|||
`FLSTDW` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '汛限制库容', |
|||
`ENABLE_FLAG` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '启用标识', |
|||
`NOTE` TEXT COLLATE utf8mb4_general_ci COMMENT '备注', |
|||
`CREATE_UID` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人', |
|||
`CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间', |
|||
`UPDATE_UID` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最近修改人', |
|||
`UPDATE_TIME` datetime DEFAULT NULL COMMENT '最近修改时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='水库汛期运用主要特征值表'; |
|||
|
|||
CREATE TABLE `bs_sgc_st_alarm` ( |
|||
`ID` VARCHAR(30) COLLATE utf8mb4_general_ci COMMENT '主键', |
|||
`RES_NAME` VARCHAR(100) COLLATE utf8mb4_general_ci COMMENT '水库名称', |
|||
`RES_CODE` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '水库编码', |
|||
`STNM` VARCHAR(100) COLLATE utf8mb4_general_ci COMMENT '测站名称', |
|||
`STCD` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '测站编码', |
|||
`STTP` VARCHAR(20) COLLATE utf8mb4_general_ci COMMENT '测站类型', |
|||
`ALARM_TYPE` VARCHAR(50) COLLATE utf8mb4_general_ci COMMENT '预警类型', |
|||
`MONITOR_DATA` VARCHAR(255) COLLATE utf8mb4_general_ci COMMENT '监测数据', |
|||
`ALARM_VALUE` VARCHAR(50) COLLATE utf8mb4_general_ci COMMENT '预警值', |
|||
`ALARM_TIME` DATETIME COMMENT '预警时间', |
|||
`ALARM_STATUS` VARCHAR(10) COLLATE utf8mb4_general_ci COMMENT '预警状态', |
|||
`ALARM_DISPOSAL` VARCHAR(255) COLLATE utf8mb4_general_ci COMMENT '告警处置', |
|||
`CREATE_BY` VARCHAR(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建者', |
|||
`CREATE_TIME` DATETIME DEFAULT NULL COMMENT '创建时间', |
|||
`UPDATE_BY` VARCHAR(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新者', |
|||
`UPDATE_TIME` DATETIME DEFAULT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='告警信息'; |
|||
|
|||
CREATE TABLE `bs_sgc_st_micfg` ( |
|||
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID', |
|||
`RES_CODE` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '水库编码', |
|||
`RES_NAME` VARCHAR(255) COLLATE utf8mb4_general_ci COMMENT '水库名称', |
|||
`MP_TYPE` VARCHAR(40) COLLATE utf8mb4_general_ci COMMENT '监测类型', |
|||
`STCD` VARCHAR(18) COLLATE utf8mb4_general_ci COMMENT '测站编码', |
|||
`WARN_TYPE` VARCHAR(40) COLLATE utf8mb4_general_ci COMMENT '预警类型', |
|||
`WARN_VALUE` VARCHAR(40) COLLATE utf8mb4_general_ci COMMENT '预警值', |
|||
`WARN_OPERATORS` TEXT COLLATE utf8mb4_general_ci COMMENT '预警通知人', |
|||
`MSG_TYPE` VARCHAR(10) COLLATE utf8mb4_general_ci COMMENT '预警通知方式', |
|||
`MSG_TEMPLATE` TEXT COLLATE utf8mb4_general_ci COMMENT '信息模板', |
|||
`WARN_INTERVAL` VARCHAR(100) COLLATE utf8mb4_general_ci COMMENT '预警通知间隔', |
|||
`WARN_TIME_UNIT` VARCHAR(10) COLLATE utf8mb4_general_ci COMMENT '预警时间单位', |
|||
`CREATE_BY` VARCHAR(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建者', |
|||
`CREATE_TIME` DATETIME DEFAULT NULL COMMENT '创建时间', |
|||
`UPDATE_BY` VARCHAR(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新者', |
|||
`UPDATE_TIME` DATETIME DEFAULT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`id`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='监测配置信息'; |
|||
|
|||
|
|||
|
Loading…
Reference in new issue