6 changed files with 213 additions and 0 deletions
@ -0,0 +1,125 @@ |
|||
package com.zc.business.domain.export; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 气象预警对象 |
|||
* |
|||
* @author liuwenge |
|||
* @date 2026-06-11 |
|||
*/ |
|||
public class MeteorologicalWarning extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** 预警标题 */ |
|||
@Excel(name = "预警标题") |
|||
private String earlyWorningTitle; |
|||
|
|||
/** 站点名称 */ |
|||
@Excel(name = "站点名称") |
|||
private String stationName; |
|||
|
|||
/** 预警发布时间 */ |
|||
@Excel(name = "预警发布时间", dateFormat = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
|||
private Date warningTime; |
|||
|
|||
/** 预警内容 */ |
|||
@Excel(name = "预警内容",width = 150) |
|||
private String earlyWorningContent; |
|||
|
|||
/** 预警类型 1-交通流预警 2-气象预警 3=交通流异常预警4-光纤告警 */ |
|||
private String warningType; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
|||
private Date startTime; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
|||
private Date endTime; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getEarlyWorningTitle() { |
|||
return earlyWorningTitle; |
|||
} |
|||
|
|||
public void setEarlyWorningTitle(String earlyWorningTitle) { |
|||
this.earlyWorningTitle = earlyWorningTitle; |
|||
} |
|||
|
|||
public String getStationName() { |
|||
return stationName; |
|||
} |
|||
|
|||
public void setStationName(String stationName) { |
|||
this.stationName = stationName; |
|||
} |
|||
|
|||
public Date getWarningTime() { |
|||
return warningTime; |
|||
} |
|||
|
|||
public void setWarningTime(Date warningTime) { |
|||
this.warningTime = warningTime; |
|||
} |
|||
|
|||
public String getEarlyWorningContent() { |
|||
return earlyWorningContent; |
|||
} |
|||
|
|||
public void setEarlyWorningContent(String earlyWorningContent) { |
|||
this.earlyWorningContent = earlyWorningContent; |
|||
} |
|||
|
|||
public String getWarningType() { |
|||
return warningType; |
|||
} |
|||
|
|||
public void setWarningType(String warningType) { |
|||
this.warningType = warningType; |
|||
} |
|||
|
|||
public Date getStartTime() { |
|||
return startTime; |
|||
} |
|||
|
|||
public void setStartTime(Date startTime) { |
|||
this.startTime = startTime; |
|||
} |
|||
|
|||
public Date getEndTime() { |
|||
return endTime; |
|||
} |
|||
|
|||
public void setEndTime(Date endTime) { |
|||
this.endTime = endTime; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this) |
|||
.append("id", id) |
|||
.append("earlyWorningTitle", earlyWorningTitle) |
|||
.append("stationName", stationName) |
|||
.append("earlyWorningIssueDate", warningTime) |
|||
.append("earlyWorningContent", earlyWorningContent) |
|||
.append("warningType", warningType) |
|||
.toString(); |
|||
} |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
<?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.zc.business.mapper.DcNoStakeWarningTableMapper"> |
|||
|
|||
|
|||
<select id="selectNoStakeWarningTableList" parameterType="com.zc.business.domain.export.MeteorologicalWarning" resultType="com.zc.business.domain.export.MeteorologicalWarning"> |
|||
select |
|||
id, |
|||
JSON_UNQUOTE(JSON_EXTRACT(other_config, '$.earlyWorningTitle')) as earlyWorningTitle, |
|||
JSON_UNQUOTE(JSON_EXTRACT(other_config, '$.stationName')) as stationName, |
|||
warning_time as warningTime, |
|||
JSON_UNQUOTE(JSON_EXTRACT(other_config, '$.earlyWorningContent')) as earlyWorningContent, |
|||
warning_type as warningType |
|||
from dc_no_stake_warning_table |
|||
<where> |
|||
warning_type = '2' |
|||
<if test="stationName != null and stationName != ''"> |
|||
and JSON_UNQUOTE(JSON_EXTRACT(other_config, '$.stationName')) = #{stationName} |
|||
</if> |
|||
<if test="startTime != null and endTime != null"> |
|||
and warning_time between #{startTime} and #{endTime} |
|||
</if> |
|||
</where> |
|||
order by warning_time desc |
|||
</select> |
|||
</mapper> |
|||
Loading…
Reference in new issue