Browse Source

告警事件详情新增字段完结时间、事件原因

develop
wangsixiang 9 months ago
parent
commit
543c04b5cc
  1. 37
      zc-business/src/main/java/com/zc/business/domain/DcWarning.java
  2. 6
      zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml
  3. 2
      zc-business/src/main/resources/mapper/business/DcWarningMapper.xml

37
zc-business/src/main/java/com/zc/business/domain/DcWarning.java

@ -96,11 +96,46 @@ public class DcWarning extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date endTime;
private Date completeTime;
//月度参数
private String quarter;
//事件原因
@Excel(name = "事件原因")
private String eventCause;
//完结时间
@Excel(name = "完结时间")
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date endTime;
//操作员
private String userName;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Date getCompleteTime() {
return completeTime;
}
public void setCompleteTime(Date completeTime) {
this.completeTime = completeTime;
}
public String getEventCause() {
return eventCause;
}
public void setEventCause(String eventCause) {
this.eventCause = eventCause;
}
public String getQuarter() {
return quarter;
}

6
zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml

@ -16,6 +16,7 @@
<select id="selectWarningById" resultType="com.zc.business.domain.DcWarning">
SELECT DISTINCT warning.`id`,warning.`stake_mark`, warning.`direction`,
warning.duration,
user.user_name,warning.event_cause,warning.end_time,
mark.longitude,mark.latitude,warning.lane,warning.vehicle_type vehicleType,
warning.`dept_id`,warning.`warning_state`,warning.`warning_time`,
warning.`user_id`, warning.`warning_source`,warning.`warning_level`,
@ -23,6 +24,7 @@
warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`,
warning.`other_config` FROM dc_warning AS warning
LEFT JOIN dc_stake_mark AS mark ON mark.stake_mark=warning.stake_mark and mark.direction=warning.direction
LEFT JOIN sys_user as user on user.user_id=warning.user_id
where warning.`id`=#{id}
</select>
<select id="selectPerceivedEventsList" resultType="com.zc.business.domain.DcWarning">
@ -40,8 +42,8 @@
<if test="warningSource != null and warningSource != ''"> and warning.warning_source = #{warningSource}</if>
<if test="direction != null and direction != ''"> and warning.direction = #{direction}</if>
<if test="stakeMark != null and stakeMark != ''"> and warning.stake_mark = #{stakeMark}</if>
<if test="startTime != null and endTime != null ">
and warning.warning_time between #{startTime} and #{endTime}</if>
<if test="startTime != null and completeTime != null ">
and warning.warning_time between #{startTime} and #{completeTime}</if>
</where>
order by warning.warning_time desc
</select>

2
zc-business/src/main/resources/mapper/business/DcWarningMapper.xml

@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<select id="export" resultType="com.zc.business.domain.DcWarning">
SELECT warning.`id`,warning.`stake_mark`, warning.`direction`,
SELECT warning.`id`,warning.`stake_mark`, warning.`direction`,warning.end_time,warning.event_cause,
mark.longitude,mark.latitude,warning.lane,warning.vehicle_type,
warning.`dept_id`,warning.`warning_state`,warning.`warning_time`,
warning.`user_id`, warning.`warning_source`,warning.`warning_level`,

Loading…
Cancel
Save