diff --git a/zc-business/src/main/java/com/zc/business/controller/DCPerceivedEventsWarningController.java b/zc-business/src/main/java/com/zc/business/controller/DCPerceivedEventsWarningController.java index b52aa90b..ab17b5bb 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DCPerceivedEventsWarningController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DCPerceivedEventsWarningController.java @@ -227,6 +227,14 @@ public class DCPerceivedEventsWarningController extends BaseController { return toAjax(perceivedEventsWarningService.updateWarning(dcWarning)); } + + //增加感知事件审核状态 + @PostMapping("/updateWarningAuditFlag") + public AjaxResult updateWarningAuditFlag(@RequestBody DcWarning dcWarning){ + dcWarning.setAuditor(getUsername()); + return toAjax(perceivedEventsWarningService.updateWarningAuditFlag(dcWarning)); + } + //查询非机预警类型,按照时间与类型查询(传入时间类型type与时间warningTime) @PostMapping("/nonAutomaticWarningType") public AjaxResult nonAutomaticWarningType(@RequestBody DcWarning dcWarning){ diff --git a/zc-business/src/main/java/com/zc/business/domain/DcWarning.java b/zc-business/src/main/java/com/zc/business/domain/DcWarning.java index f81e7a0a..b1d4661f 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcWarning.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcWarning.java @@ -76,6 +76,40 @@ public class DcWarning extends BaseEntity @Excel(name = "车道",readConverterExp="0=应急,1=行1,2=行2,3=行3,4=行4") private String lane; + @Excel(name="审核人") + private String auditor; + + public String getAuditor() { + return auditor; + } + + public void setAuditor(String auditor) { + this.auditor = auditor; + } + + public Date getAuditTime() { + return auditTime; + } + + public void setAuditTime(Date auditTime) { + this.auditTime = auditTime; + } + + public Integer getAuditFlag() { + return auditFlag; + } + + public void setAuditFlag(Integer auditFlag) { + this.auditFlag = auditFlag; + } + + @Excel(name="审核时间") + private Date auditTime; + + @Excel(name="审核状态",readConverterExp = "1=正确,2=错误") + private Integer auditFlag; + + /** 所属辖区路段名称 */ private String sectionName; diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcPerceivedEventsWarningMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcPerceivedEventsWarningMapper.java index dcfd6986..387392a9 100644 --- a/zc-business/src/main/java/com/zc/business/mapper/DcPerceivedEventsWarningMapper.java +++ b/zc-business/src/main/java/com/zc/business/mapper/DcPerceivedEventsWarningMapper.java @@ -72,6 +72,9 @@ public interface DcPerceivedEventsWarningMapper { List> selectWarningEscalation(DcWarning dcWarning); //修改感知事件信息 Integer updateWarning(DcWarning dcWarning); + + //增加感知事件审核状态 + Integer updateWarningAuditFlag(DcWarning dcWarning); //查询事件条数,以桩号和方向,时间作为条件 String selectWarningMarkDay(DcWarning dcWarning); String selectWarningMarkMonth(DcWarning dcWarning); diff --git a/zc-business/src/main/java/com/zc/business/service/IDCPerceivedEventsWarningService.java b/zc-business/src/main/java/com/zc/business/service/IDCPerceivedEventsWarningService.java index ae338ab0..46262912 100644 --- a/zc-business/src/main/java/com/zc/business/service/IDCPerceivedEventsWarningService.java +++ b/zc-business/src/main/java/com/zc/business/service/IDCPerceivedEventsWarningService.java @@ -54,6 +54,8 @@ public interface IDCPerceivedEventsWarningService { //修改感知事件信息 Integer updateWarning(DcWarning dcWarning); + Integer updateWarningAuditFlag(DcWarning dcWarning); + //查询非机预警事件按照类型区分时间查询 List> selectTypeNonAutomaticWarning(DcWarning dcWarning); //查询非机预警按照时间类型查询 diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcPerceivedEventsWarningServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcPerceivedEventsWarningServiceImpl.java index f4bf4bb1..0b69ff3c 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcPerceivedEventsWarningServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcPerceivedEventsWarningServiceImpl.java @@ -266,6 +266,12 @@ public class DcPerceivedEventsWarningServiceImpl implements IDCPerceivedEventsWa dcWarning.setUpdateTime(DateUtils.getNowDate()); return perceivedEventsWarningMapper.updateWarning(dcWarning); } + + + public Integer updateWarningAuditFlag(DcWarning dcWarning) { + dcWarning.setAuditTime(DateUtils.getNowDate()); + return perceivedEventsWarningMapper.updateWarningAuditFlag(dcWarning); + } //查询非机预警事件按照类型区分时间查询 @Override public List> selectTypeNonAutomaticWarning(DcWarning dcWarning) { diff --git a/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml index e5c2ac2f..30775967 100644 --- a/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml @@ -15,7 +15,7 @@ select count(1) from dc_warning where stake_mark=#{stakeMark} AND direction=#{direction} and DATE(warning_time)=DATE_FORMAT(#{warningTime},'%Y-%m-%d') diff --git a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml index 58424fad..36a7815f 100644 --- a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml @@ -87,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" warning.`id`,warning.`stake_mark`, warning.`direction`,warning.end_time,warning.event_cause, warning.lane,warning.vehicle_type,mark.longitude,mark.latitude, warning.`dept_id`,warning.`warning_state`,warning.`warning_time`, + warning.`auditor`,warning.`audit_time`,warning.`audit_flag`, warning.`user_id`, warning.`warning_source`,warning.`warning_level`, warning.`remark`, warning.`create_time`,warning.`update_time`, warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`, @@ -103,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{warningSubclass} and warning.direction = #{direction} + and warning.audit_flag = #{auditFlag} and warning.stake_mark = #{stakeMark} and warning.warning_time between #{startTime} and #{completeTime}