14 changed files with 600 additions and 24 deletions
@ -0,0 +1,35 @@ |
|||||
|
package com.kms.yxgh.common.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.kms.yxgh.base.Response; |
||||
|
import com.kms.yxgh.common.dto.VideoWarningDto; |
||||
|
import com.kms.yxgh.common.dto.WarningQueDto; |
||||
|
import com.kms.yxgh.common.service.VideoWarningService; |
||||
|
import com.shuili.common.core.domain.SearchParam; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
|
||||
|
@RestController |
||||
|
@AllArgsConstructor |
||||
|
@RequestMapping("/run/api/video/warning") |
||||
|
@Api(tags = "运行管理视频预警相关") |
||||
|
public class VideoWarningController { |
||||
|
|
||||
|
private final VideoWarningService warningService; |
||||
|
|
||||
|
@PostMapping("/list") |
||||
|
@ApiOperation("预警列表") |
||||
|
public IPage<VideoWarningDto> list(@RequestBody SearchParam<WarningQueDto> sp) { |
||||
|
return warningService.selectPage(sp); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/{id}") |
||||
|
@ApiOperation("预警详情") |
||||
|
public Response<VideoWarningDto> detail(@PathVariable String id) { |
||||
|
return Response.ok(warningService.detail(id)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.kms.yxgh.common.controller; |
||||
|
|
||||
|
import io.swagger.annotations.Api; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: WarningDataController |
||||
|
* @Description: TODO |
||||
|
* @Date: 2024/3/24 下午9:27 |
||||
|
* * |
||||
|
* @author: hxh |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@AllArgsConstructor |
||||
|
@RequestMapping("/run/api/indicator") |
||||
|
@Api(tags = "运行管理运行指标相关") |
||||
|
public class WarningDataController { |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
package com.kms.yxgh.common.domain; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.kms.yxgh.base.SyBaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: MonitoringData |
||||
|
* @Description: TODO |
||||
|
* @Date: 2024/3/24 下午7:14 |
||||
|
* * |
||||
|
* @author: hxh |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
@TableName("bs_sgc_stc_jc") |
||||
|
@Data |
||||
|
@ApiModel("监测数据表") |
||||
|
public class MonitoringData extends SyBaseEntity { |
||||
|
// 测站编码
|
||||
|
private String stcd; |
||||
|
// 上游水位
|
||||
|
private Float upstreamLevel; |
||||
|
// 下游水位
|
||||
|
private Float downstreamLevel; |
||||
|
// 开度
|
||||
|
private Float opening; |
||||
|
// 过闸流量
|
||||
|
private Float gateFlow; |
||||
|
// 雨量
|
||||
|
private Float rainFall; |
||||
|
// 绕渗透压
|
||||
|
private Float bypassOsmoticPressure; |
||||
|
// 渗透压计高程
|
||||
|
private Float osmoticPressureGaugeElevation; |
||||
|
// 闸机扬压力
|
||||
|
private Float boostPressure; |
||||
|
// 水闸接缝
|
||||
|
private Float seam; |
||||
|
// 裂缝开合度
|
||||
|
private Float crackOpeningDegree; |
||||
|
// 闸墩变形x
|
||||
|
private Float deformationX; |
||||
|
// 闸墩变形y
|
||||
|
private Float deformationY; |
||||
|
// 闸机油温
|
||||
|
private Float oilTemperature; |
||||
|
// 采集时间
|
||||
|
private Date collectionTime; |
||||
|
|
||||
|
private Integer year; |
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private String remark; |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.kms.yxgh.common.domain; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.kms.yxgh.base.SyBaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: MonitoringStation |
||||
|
* @Description: TODO |
||||
|
* @Date: 2024/3/24 下午6:28 |
||||
|
* * |
||||
|
* @author: hxh |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
@TableName("bs_sgc_stc_cz") |
||||
|
@Data |
||||
|
@ApiModel("测站表") |
||||
|
public class MonitoringStation extends SyBaseEntity { |
||||
|
|
||||
|
|
||||
|
private String stcd; |
||||
|
private String stcdName; |
||||
|
private String code; |
||||
|
private String type; |
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private String remark; |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.kms.yxgh.common.domain; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.kms.yxgh.base.SyBaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: VideoWarning |
||||
|
* @Description: TODO |
||||
|
* @Date: 2024/3/24 下午6:25 |
||||
|
* * |
||||
|
* @author: hxh |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
@TableName("bs_sgc_stc_spfx") |
||||
|
@Data |
||||
|
@ApiModel("视频分析预警") |
||||
|
public class VideoWarning extends SyBaseEntity { |
||||
|
|
||||
|
|
||||
|
private String code; |
||||
|
|
||||
|
private Integer type; |
||||
|
|
||||
|
private String name; |
||||
|
|
||||
|
private Date warningTime; |
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private String remark; |
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
package com.kms.yxgh.common.dto; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: VideoWarningDto |
||||
|
* @Description: TODO |
||||
|
* @Date: 2024/3/24 下午7:24 |
||||
|
* * |
||||
|
* @author: hxh |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
|
||||
|
@ApiModel("视频预警") |
||||
|
@Data |
||||
|
public class VideoWarningDto { |
||||
|
|
||||
|
@ApiModelProperty(value = "id") |
||||
|
private String id; |
||||
|
@ApiModelProperty(value = "对象编码") |
||||
|
private String code; |
||||
|
|
||||
|
@ApiModelProperty(value = "对象名称") |
||||
|
private String objName; |
||||
|
|
||||
|
@ApiModelProperty(value = "对象类型") |
||||
|
private Integer type; |
||||
|
|
||||
|
@ApiModelProperty(value = "预警名称") |
||||
|
private String name; |
||||
|
|
||||
|
@ApiModelProperty(value = "预警地点") |
||||
|
private String location; |
||||
|
|
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
@ApiModelProperty(value = "预警时间") |
||||
|
private Date warningTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,137 @@ |
|||||
|
package com.kms.yxgh.common.job; |
||||
|
|
||||
|
import cn.hutool.core.date.DateField; |
||||
|
import cn.hutool.core.util.RandomUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
|
import com.kms.yg.df.domain.BsSgcDfJbxx; |
||||
|
import com.kms.yg.df.mapper.BsSgcDfJbxxMapper; |
||||
|
import com.kms.yg.sz.domain.BsSgcSzGcda; |
||||
|
import com.kms.yg.sz.mapper.BsSgcSzGcdaMapper; |
||||
|
import com.kms.yxgh.common.domain.MonitoringData; |
||||
|
import com.kms.yxgh.common.domain.MonitoringStation; |
||||
|
import com.kms.yxgh.common.domain.VideoWarning; |
||||
|
import com.kms.yxgh.common.mapper.MonitoringDataMapper; |
||||
|
import com.kms.yxgh.common.mapper.MonitoringStationMapper; |
||||
|
import com.kms.yxgh.common.mapper.VideoWarningMapper; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.beans.factory.annotation.Value; |
||||
|
import org.springframework.scheduling.annotation.EnableScheduling; |
||||
|
import org.springframework.scheduling.annotation.Scheduled; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.time.ZoneId; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: Job |
||||
|
* @Description: TODO |
||||
|
* @Date: 2024/3/24 下午8:06 |
||||
|
* * |
||||
|
* @author: hxh |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
//开启spring定时任务
|
||||
|
@EnableScheduling |
||||
|
@Component |
||||
|
public class Job { |
||||
|
|
||||
|
@Value("${job.isRunning:false}") |
||||
|
private Boolean isRunning; |
||||
|
|
||||
|
@Autowired |
||||
|
private BsSgcDfJbxxMapper bsSgcDfJbxxMapper; |
||||
|
|
||||
|
@Autowired |
||||
|
private BsSgcSzGcdaMapper bsSgcSzJbxxMapper; |
||||
|
|
||||
|
@Autowired |
||||
|
private VideoWarningMapper videoWarningMapper; |
||||
|
|
||||
|
@Autowired |
||||
|
private MonitoringDataMapper monitoringDataMapper; |
||||
|
|
||||
|
@Autowired |
||||
|
private MonitoringStationMapper monitoringStationMapper; |
||||
|
|
||||
|
@Scheduled(cron = "0 0/5 * * * ?") |
||||
|
public void run() { |
||||
|
if (isRunning) { |
||||
|
List<BsSgcDfJbxx> dfList = dfList(); |
||||
|
List<BsSgcSzGcda> szList = szList(); |
||||
|
try { |
||||
|
insert(dfList.get(RandomUtil.randomInt(dfList.size())).getDikeCode(), 1); |
||||
|
} catch (Exception ignored) { |
||||
|
} |
||||
|
try { |
||||
|
insert(szList.get(RandomUtil.randomInt(szList.size())).getWagaCode(), 2); |
||||
|
} catch (Exception ignored) { |
||||
|
} |
||||
|
try { |
||||
|
initMonitoringData(); |
||||
|
} catch (Exception ignored) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private void initMonitoringData() { |
||||
|
List<MonitoringStation> monitoringStationList = monitoringStationList(); |
||||
|
int size = RandomUtil.randomInt(2, 4); |
||||
|
for (int i = 0; i < size; i++) { |
||||
|
MonitoringStation monitoringStation = monitoringStationList.get(RandomUtil.randomInt(monitoringStationList.size())); |
||||
|
MonitoringData monitoringData = new MonitoringData(); |
||||
|
monitoringData.setStcd(monitoringStation.getStcd()); |
||||
|
monitoringData.setUpstreamLevel((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setDownstreamLevel((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setOpening((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setGateFlow((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setRainFall((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setBypassOsmoticPressure((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setOsmoticPressureGaugeElevation((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setBoostPressure((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setSeam((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setCrackOpeningDegree((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setDeformationX((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setDeformationY((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setOilTemperature((float) RandomUtil.randomDouble(0, 100)); |
||||
|
monitoringData.setCollectionTime(new Date()); |
||||
|
monitoringData.setYear(monitoringData.getCollectionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate().getYear()); |
||||
|
monitoringDataMapper.insert(monitoringData); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
private void insert(String code, Integer type) { |
||||
|
VideoWarning videoWarning = new VideoWarning(); |
||||
|
videoWarning.setCode(code); |
||||
|
videoWarning.setType(type); |
||||
|
videoWarning.setName(warningName()); |
||||
|
videoWarning.setWarningTime(RandomUtil.randomDate(new Date(), DateField.SECOND, 1, 60)); |
||||
|
videoWarningMapper.insert(videoWarning); |
||||
|
} |
||||
|
|
||||
|
private List<MonitoringStation> monitoringStationList() { |
||||
|
return monitoringStationMapper.selectList(null); |
||||
|
} |
||||
|
|
||||
|
private String warningName() { |
||||
|
String[] dfWarningName = {"岸边违规侵占", "水面漂浮物聚集", "降雨天气识别", "违规下水游泳"}; |
||||
|
return dfWarningName[RandomUtil.randomInt(dfWarningName.length)]; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private List<BsSgcDfJbxx> dfList() { |
||||
|
Wrapper<BsSgcDfJbxx> wrapper = Wrappers.<BsSgcDfJbxx>lambdaQuery() |
||||
|
.isNull(BsSgcDfJbxx::getExprDate); |
||||
|
return bsSgcDfJbxxMapper.selectList(wrapper); |
||||
|
} |
||||
|
|
||||
|
private List<BsSgcSzGcda> szList() { |
||||
|
Wrapper<BsSgcSzGcda> wrapper = Wrappers.<BsSgcSzGcda>lambdaQuery() |
||||
|
.isNull(BsSgcSzGcda::getExprDate); |
||||
|
return bsSgcSzJbxxMapper.selectList(wrapper); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.kms.yxgh.common.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.kms.yxgh.common.domain.MonitoringData; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: MonitoringDataMapper |
||||
|
* @Description: TODO |
||||
|
* @Date: 2024/3/24 下午7:18 |
||||
|
* * |
||||
|
* @author: hxh |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
|
||||
|
@Repository |
||||
|
public interface MonitoringDataMapper extends BaseMapper<MonitoringData> { |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.kms.yxgh.common.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.kms.yxgh.common.domain.MonitoringStation; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: MonitoringStationMapper |
||||
|
* @Description: TODO |
||||
|
* @Date: 2024/3/24 下午7:19 |
||||
|
* * |
||||
|
* @author: hxh |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
@Repository |
||||
|
public interface MonitoringStationMapper extends BaseMapper<MonitoringStation> { |
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
package com.kms.yxgh.common.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.kms.yxgh.common.domain.VideoWarning; |
||||
|
import com.kms.yxgh.common.dto.VideoWarningDto; |
||||
|
import com.kms.yxgh.common.dto.WarningQueDto; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.apache.ibatis.annotations.Select; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: VideoWarningMapper |
||||
|
* @Description: TODO |
||||
|
* @Date: 2024/3/24 下午7:20 |
||||
|
* * |
||||
|
* @author: hxh |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
|
||||
|
@Repository |
||||
|
public interface VideoWarningMapper extends BaseMapper<VideoWarning> { |
||||
|
@Select("<script>" + |
||||
|
"SELECT a.id,a.code,a.type,a.name,a.warning_time," + |
||||
|
" (case when a.type = 1 then (select dike_name from bs_sgc_df_gcda where dike_code = a.code and expr_date is null) end " + |
||||
|
" when a.type = 2 then (select waga_name from bs_sgc_sz_jbxx where waga_code = a.code and expr_date is null ) end) as objName " + |
||||
|
" FROM bs_sgc_stc_spfx a order by a.create_time desc" + |
||||
|
" <if test='dto.code != null and dto.code != \"\"'>" + |
||||
|
"AND a.code = #{dto.code} " + |
||||
|
"</if>" + |
||||
|
"<if test='dto.startTime != null'>" + |
||||
|
"AND a.create_time >= #{dto.startTime} " + |
||||
|
"</if>" + |
||||
|
"<if test='dto.endTime != null'>" + |
||||
|
"AND a.create_time <= #{dto.endTime} " + |
||||
|
"</if>" + |
||||
|
"<if test='dto.types != null and dto.types.size() > 0'>" + |
||||
|
"AND a.type in " + |
||||
|
"<foreach collection='dto.types' item='type' open='(' close=')' separator=','>" + |
||||
|
"#{type}" + |
||||
|
"</foreach>" + |
||||
|
"</if>" + |
||||
|
"</script>") |
||||
|
IPage<VideoWarningDto> search(Page<VideoWarning> page, @Param("dto") WarningQueDto dto); |
||||
|
|
||||
|
@Select("<script>" + |
||||
|
"SELECT a.id,a.code,a.type,a.name,a.warning_time ," + |
||||
|
" (case when a.type = 1 then (select dike_name from bs_sgc_df_gcda where dike_code = a.code and expr_date is null) end " + |
||||
|
" when a.type = 2 then (select waga_name from bs_sgc_sz_jbxx where waga_code = a.code and expr_date is null ) end) as objName, " + |
||||
|
" FROM bs_sgc_stc_spfx a order by a.create_time desc" + |
||||
|
" where a.id = #{id}" + |
||||
|
"</script>") |
||||
|
VideoWarningDto detail(@Param("id") String id); |
||||
|
} |
@ -0,0 +1,62 @@ |
|||||
|
package com.kms.yxgh.common.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.kms.yxgh.common.domain.VideoWarning; |
||||
|
import com.kms.yxgh.common.dto.VideoWarningDto; |
||||
|
import com.kms.yxgh.common.dto.WarningQueDto; |
||||
|
import com.kms.yxgh.common.mapper.VideoWarningMapper; |
||||
|
import com.shuili.common.core.domain.SearchParam; |
||||
|
import com.shuili.common.utils.StringUtils; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Calendar; |
||||
|
import java.util.Date; |
||||
|
import java.util.Optional; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: videoWarningService |
||||
|
* @Description: TODO |
||||
|
* @Date: 2024/3/24 下午7:22 |
||||
|
* * |
||||
|
* @author: hxh |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
@Service |
||||
|
@RequiredArgsConstructor |
||||
|
public class VideoWarningService { |
||||
|
private final VideoWarningMapper videoWarningMapper; |
||||
|
|
||||
|
public IPage<VideoWarningDto> selectPage(SearchParam<WarningQueDto> sp) { |
||||
|
Page<VideoWarning> page = new Page<>(sp.getPageNum(), sp.getPageSize()); |
||||
|
WarningQueDto data = Optional.ofNullable(sp.getData()).orElse(new WarningQueDto()); |
||||
|
if (StringUtils.isNotBlank(data.getAdcd())) { |
||||
|
data.setAdcd(remove00(data.getAdcd())); |
||||
|
} |
||||
|
if (data.getFromTime() != null && data.getStartTime() == null) { |
||||
|
data.setStartTime(getBeforeTime(data.getFromTime())); |
||||
|
} |
||||
|
return videoWarningMapper.search(page, data); |
||||
|
} |
||||
|
|
||||
|
private String remove00(String str) { |
||||
|
if (str.endsWith("00")) { |
||||
|
return str.substring(0, str.length() - 2); |
||||
|
} else if (str.endsWith("0000")) { |
||||
|
return str.substring(0, str.length() - 4); |
||||
|
} |
||||
|
return str; |
||||
|
} |
||||
|
|
||||
|
//计算指定小时数前的时间
|
||||
|
private Date getBeforeTime(Integer fromTime) { |
||||
|
Calendar calendar = Calendar.getInstance(); |
||||
|
calendar.add(Calendar.HOUR, -fromTime); |
||||
|
return calendar.getTime(); |
||||
|
} |
||||
|
|
||||
|
public VideoWarningDto detail(String id) { |
||||
|
return videoWarningMapper.detail(id); |
||||
|
} |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
SET NAMES utf8mb4; |
||||
|
|
||||
|
CREATE TABLE `bs_sgc_stc_jc` ( |
||||
|
`ID` int NOT NULL AUTO_INCREMENT COMMENT '监测id', |
||||
|
`STCD` varchar(255) COLLATE utf8mb4_general_ci COMMENT '测站编码', |
||||
|
`UPSTREAM_LEVEL` float NULL DEFAULT NULL COMMENT '上游水位', |
||||
|
`DOWNSTREAM_LEVEL` float NULL DEFAULT NULL COMMENT '下游水位', |
||||
|
`OPENING` float NULL DEFAULT NULL COMMENT '开度', |
||||
|
`GATE_FLOW` float NULL DEFAULT NULL COMMENT '过闸流量', |
||||
|
`RAIN_FALL` float NULL DEFAULT NULL COMMENT '雨量', |
||||
|
`BYPASS_OSMOTIC_PRESSURE` float NULL DEFAULT NULL COMMENT '绕渗透压', |
||||
|
`OSMOTIC_PRESSURE_GAUGE_ELEVATION` float NULL DEFAULT NULL COMMENT '渗透压计高程', |
||||
|
`BOOST_PRESSURE` float NULL DEFAULT NULL COMMENT '闸机扬压力', |
||||
|
`SEAM` float NULL DEFAULT NULL COMMENT '水闸接缝', |
||||
|
`CRACK_OPENING_DEGREE` float NULL DEFAULT NULL COMMENT '裂缝开合度', |
||||
|
`DEFORMATION_X` float NULL DEFAULT NULL COMMENT '闸墩变形x', |
||||
|
`DEFORMATION_Y` float NULL DEFAULT NULL COMMENT '闸墩变形y', |
||||
|
`OIL_TEMPERATURE` float NULL DEFAULT NULL COMMENT '闸机油温', |
||||
|
`YEAR` int NOT NULL COMMENT '年份', |
||||
|
`COLLECTION_TIME` datetime DEFAULT NULL 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_stc_cz` ( |
||||
|
`ID` int NOT NULL AUTO_INCREMENT COMMENT 'id', |
||||
|
`STCD` varchar(255) COLLATE utf8mb4_general_ci COMMENT '测站编码', |
||||
|
`STCD_NAME` varchar(255) COLLATE utf8mb4_general_ci COMMENT '测站名称', |
||||
|
`CODE` varchar(255) COLLATE utf8mb4_general_ci COMMENT '对象编码', |
||||
|
`TYPE` int NULL DEFAULT NULL 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_stc_spfx` ( |
||||
|
`ID` int NOT NULL AUTO_INCREMENT COMMENT '编号', |
||||
|
`CODE` varchar(255) COLLATE utf8mb4_general_ci COMMENT '对象编码', |
||||
|
`TYPE` int NULL DEFAULT NULL COMMENT '类型', |
||||
|
`NAME` varchar(100) DEFAULT NULL COMMENT '名称', |
||||
|
`WARNING_TIME` datetime DEFAULT NULL 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='视频分析表'; |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
Loading…
Reference in new issue