Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-dc into develop

develop
xiepufeng 10 months ago
parent
commit
6e31cd0449
  1. 2
      zc-business/src/main/java/com/zc/business/domain/DcEventAccident.java
  2. 3
      zc-business/src/main/java/com/zc/business/message/device/listener/DevicePropertyReportListener.java
  3. 4
      zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
  4. 7
      zc-business/src/main/resources/mapper/business/DcEventAccidentMapper.xml

2
zc-business/src/main/java/com/zc/business/domain/DcEventAccident.java

@ -158,9 +158,11 @@ public class DcEventAccident extends BaseEntity {
* 3-行3
* 4-行4
*/
/*
@ApiModelProperty("车道占用")
private Long laneOccupancy;
*/
/**
* 小型车()

3
zc-business/src/main/java/com/zc/business/message/device/listener/DevicePropertyReportListener.java

@ -23,6 +23,7 @@ import java.util.Map;
/**
* 设备属性上报消息监听
*/
@Component
public class DevicePropertyReportListener implements StreamListener<String, ObjectRecord<String, String>>
{
@ -58,5 +59,7 @@ public class DevicePropertyReportListener implements StreamListener<String, Obje
});
// 消费完后直接删除消息
redisStream.del(streamKay, String.valueOf(recordId));
}
}

4
zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java

@ -109,8 +109,12 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper;
dcEvent.setEventState(0L);
//获取部门信息
dcEvent.setDeptId(SecurityUtils.getDeptId());
//用户
dcEvent.setUserId(SecurityUtils.getUserId());
dcEvent.setCreateTime(DateUtils.getNowDate());
int i7 = dcEventMapper.insertDcEvent(dcEvent);
if (i7>0){
//获取事件类型
int eventType = Math.toIntExact(dcEvent.getEventType());

7
zc-business/src/main/resources/mapper/business/DcEventAccidentMapper.xml

@ -21,7 +21,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="onCurve" column="on_curve" />
<result property="spillageItem" column="spillage_item" />
<result property="vehicleOwnerPhone" column="vehicle_owner_phone" />
<result property="laneOccupancy" column="lane_occupancy" />
<result property="smallCar" column="small_car" />
<result property="trucks" column="trucks" />
<result property="buses" column="buses" />
@ -34,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDcEventAccidentVo">
select id, reporter_name, reporter_phone_number, accident_type, location_type, traffic_jam, weather_condition, impact_level, is_reverse_cargo, is_maintenance, police_contact, towing_service_contact, congestion_ahead, at_intersection, on_curve, spillage_item, vehicle_owner_phone, lane_occupancy, small_car, trucks, buses, tankers, minor_injuries, serious_injuries, fatalities, is_private, facility_id from dc_event_accident
select id, reporter_name, reporter_phone_number, accident_type, location_type, traffic_jam, weather_condition, impact_level, is_reverse_cargo, is_maintenance, police_contact, towing_service_contact, congestion_ahead, at_intersection, on_curve, spillage_item, vehicle_owner_phone, small_car, trucks, buses, tankers, minor_injuries, serious_injuries, fatalities, is_private, facility_id from dc_event_accident
</sql>
<select id="selectDcEventAccidentList" parameterType="DcEventAccident" resultMap="DcEventAccidentResult">
@ -56,7 +55,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="onCurve != null "> and on_curve = #{onCurve}</if>
<if test="spillageItem != null and spillageItem != ''"> and spillage_item = #{spillageItem}</if>
<if test="vehicleOwnerPhone != null and vehicleOwnerPhone != ''"> and vehicle_owner_phone = #{vehicleOwnerPhone}</if>
<if test="laneOccupancy != null "> and lane_occupancy = #{laneOccupancy}</if>
<if test="smallCar != null "> and small_car = #{smallCar}</if>
<if test="trucks != null "> and trucks = #{trucks}</if>
<if test="buses != null "> and buses = #{buses}</if>
@ -94,7 +92,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="onCurve != null">on_curve,</if>
<if test="spillageItem != null">spillage_item,</if>
<if test="vehicleOwnerPhone != null">vehicle_owner_phone,</if>
<if test="laneOccupancy != null">lane_occupancy,</if>
<if test="smallCar != null">small_car,</if>
<if test="trucks != null">trucks,</if>
<if test="buses != null">buses,</if>
@ -123,7 +120,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="onCurve != null">#{onCurve},</if>
<if test="spillageItem != null">#{spillageItem},</if>
<if test="vehicleOwnerPhone != null">#{vehicleOwnerPhone},</if>
<if test="laneOccupancy != null">#{laneOccupancy},</if>
<if test="smallCar != null">#{smallCar},</if>
<if test="trucks != null">#{trucks},</if>
<if test="buses != null">#{buses},</if>
@ -155,7 +151,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="onCurve != null">on_curve = #{onCurve},</if>
<if test="spillageItem != null">spillage_item = #{spillageItem},</if>
<if test="vehicleOwnerPhone != null">vehicle_owner_phone = #{vehicleOwnerPhone},</if>
<if test="laneOccupancy != null">lane_occupancy = #{laneOccupancy},</if>
<if test="smallCar != null">small_car = #{smallCar},</if>
<if test="trucks != null">trucks = #{trucks},</if>
<if test="buses != null">buses = #{buses},</if>

Loading…
Cancel
Save