Browse Source

--增加感知事件审核查询和显示

develop
mengff 4 weeks ago
parent
commit
0f63e58921
  1. 2
      zc-business/src/main/java/com/zc/business/controller/DCPerceivedEventsWarningController.java
  2. 5
      zc-business/src/main/java/com/zc/business/domain/DcWarning.java
  3. 15
      zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml
  4. 2
      zc-business/src/main/resources/mapper/business/DcWarningMapper.xml

2
zc-business/src/main/java/com/zc/business/controller/DCPerceivedEventsWarningController.java

@ -45,6 +45,8 @@ public class DCPerceivedEventsWarningController extends BaseController {
if (id==null){ if (id==null){
return AjaxResult.error(UniversalEnum.PARAMETER_ERROR.getValue()); return AjaxResult.error(UniversalEnum.PARAMETER_ERROR.getValue());
} }
DcWarning ww=perceivedEventsWarningService.selectWarningById(id);
System.out.println(ww);
return AjaxResult.success(perceivedEventsWarningService.selectWarningById(id)); return AjaxResult.success(perceivedEventsWarningService.selectWarningById(id));
} }
//告警事件列表 //告警事件列表

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

@ -103,10 +103,11 @@ public class DcWarning extends BaseEntity
this.auditFlag = auditFlag; this.auditFlag = auditFlag;
} }
@Excel(name="审核时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@Excel(name="审核时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date auditTime; private Date auditTime;
@Excel(name="审核状态",readConverterExp = "1=正确,2=错误") @Excel(name="审核状态",readConverterExp = "0=未审核,1=正确,2=错误")
private Integer auditFlag; private Integer auditFlag;

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

@ -15,13 +15,13 @@
</select> </select>
<select id="selectWarningById" resultType="com.zc.business.domain.DcWarning"> <select id="selectWarningById" resultType="com.zc.business.domain.DcWarning">
SELECT DISTINCT warning.`id`,warning.`stake_mark`, warning.`direction`, SELECT DISTINCT warning.`id`,warning.`stake_mark`, warning.`direction`,
warning.duration,warning.`auditor`,warning.`audit_time`,warning.`audit_flag`, warning.duration,
user.user_name,warning.event_cause,warning.end_time, user.user_name,warning.event_cause,warning.end_time,
mark.longitude,mark.latitude,warning.lane,warning.vehicle_type vehicleType, mark.longitude,mark.latitude,warning.lane,warning.vehicle_type vehicleType,
warning.`dept_id`,warning.`warning_state`,warning.`warning_time`, warning.`dept_id`,warning.`warning_state`,warning.`warning_time`,
warning.`user_id`, warning.`warning_source`,warning.`warning_level`, warning.`user_id`, warning.`warning_source`,warning.`warning_level`,
warning.`remark`, warning.`create_time`,warning.`update_time`, warning.`remark`, warning.`create_time`,warning.`update_time`,
warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`, warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`,warning.`auditor`,IFNULL(warning.`audit_flag`, 0) AS `audit_flag`,warning.`audit_time`,
warning.`other_config` FROM dc_warning AS warning 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 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 LEFT JOIN sys_user as user on user.user_id=warning.user_id
@ -45,7 +45,16 @@
<if test="warningSubclass != null and warningSubclass != ''"> and warning.warning_subclass = #{warningSubclass}</if> <if test="warningSubclass != null and warningSubclass != ''"> and warning.warning_subclass = #{warningSubclass}</if>
<if test="direction != null and direction != ''"> and warning.direction = #{direction}</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="stakeMark != null and stakeMark != ''"> and warning.stake_mark = #{stakeMark}</if>
<if test="auditFlag != null and auditFlag != ''"> and warning.audit_flag = #{auditFlag}</if> <if test="auditFlag != null">
<choose>
<when test="auditFlag == 0">
and warning.audit_flag is null
</when>
<otherwise>
and warning.audit_flag = #{auditFlag}
</otherwise>
</choose>
</if>
<if test="startTime != null and completeTime != null "> <if test="startTime != null and completeTime != null ">
and warning.warning_time between #{startTime} and #{completeTime}</if> and warning.warning_time between #{startTime} and #{completeTime}</if>
<if test="startStakeMark != null and startStakeMark != ''"> <if test="startStakeMark != null and startStakeMark != ''">

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

@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
warning.`id`,warning.`stake_mark`, warning.`direction`,warning.end_time,warning.event_cause, warning.`id`,warning.`stake_mark`, warning.`direction`,warning.end_time,warning.event_cause,
warning.lane,warning.vehicle_type,mark.longitude,mark.latitude, warning.lane,warning.vehicle_type,mark.longitude,mark.latitude,
warning.`dept_id`,warning.`warning_state`,warning.`warning_time`, warning.`dept_id`,warning.`warning_state`,warning.`warning_time`,
warning.`auditor`,warning.`audit_time`,warning.`audit_flag`, warning.`auditor`,warning.`audit_time`,IFNULL(warning.`audit_flag`, 0) AS `audit_flag`,
warning.`user_id`, warning.`warning_source`,warning.`warning_level`, warning.`user_id`, warning.`warning_source`,warning.`warning_level`,
warning.`remark`, warning.`create_time`,warning.`update_time`, warning.`remark`, warning.`create_time`,warning.`update_time`,
warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`, warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`,

Loading…
Cancel
Save