|
|
@ -231,6 +231,92 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<insert id="batchInsertMiddleDatabaseEvent"> |
|
|
|
<foreach collection ="list" item="mdEvent" index= "index" separator =";"> |
|
|
|
insert into event |
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
<if test="mdEvent.fusionId != null">fusionId,</if> |
|
|
|
<if test="mdEvent.eventName != null">event_name,</if> |
|
|
|
<if test="mdEvent.eventTypeCode != null">event_type_code,</if> |
|
|
|
<if test="mdEvent.eventDesc != null">event_desc,</if> |
|
|
|
<if test="mdEvent.occurTime != null">occur_time,</if> |
|
|
|
<if test="mdEvent.endTime != null">end_time,</if> |
|
|
|
<if test="mdEvent.stakeNumber != null and mdEvent.stakeNumber != ''">stake_number,</if> |
|
|
|
<if test="mdEvent.longitude != null">longitude,</if> |
|
|
|
<if test="mdEvent.latitude != null">latitude,</if> |
|
|
|
<if test="mdEvent.lane != null">lane,</if> |
|
|
|
<if test="mdEvent.direction != null and mdEvent.direction != ''">direction,</if> |
|
|
|
<if test="mdEvent.location != null">location,</if> |
|
|
|
<if test="mdEvent.eventSourceCode != null">event_source_code,</if> |
|
|
|
<if test="mdEvent.eventSource != null">event_source,</if> |
|
|
|
<if test="mdEvent.eventStatus != null">event_status,</if> |
|
|
|
<if test="mdEvent.eventLevel != null">event_level,</if> |
|
|
|
<if test="mdEvent.sectionId != null">section_id,</if> |
|
|
|
<if test="mdEvent.eventTypeCode2 != null">event_type_code2,</if> |
|
|
|
<if test="mdEvent.eventCause != null">event_cause,</if> |
|
|
|
<if test="mdEvent.accidentWeather != null">accident_weather,</if> |
|
|
|
<if test="mdEvent.accidentQueue != null">accident_queue,</if> |
|
|
|
<if test="mdEvent.congestionPile != null">congestion_pile,</if> |
|
|
|
<if test="mdEvent.congestionReason != null">congestion_reason,</if> |
|
|
|
<if test="mdEvent.controlCategory != null">control_category,</if> |
|
|
|
<if test="mdEvent.controlReason != null">control_reason,</if> |
|
|
|
<if test="mdEvent.controlReasonType != null">control_reason_type,</if> |
|
|
|
<if test="mdEvent.controlStation != null">control_station,</if> |
|
|
|
<if test="mdEvent.controlPile != null">control_pile,</if> |
|
|
|
<if test="mdEvent.controlStrategy != null">control_strategy,</if> |
|
|
|
<if test="mdEvent.controlType != null">control_type,</if> |
|
|
|
<if test="mdEvent.controlVehicleType != null">control_vehicle_type,</if> |
|
|
|
<if test="mdEvent.creatorUserId != null">CreatorUserId,</if> |
|
|
|
<if test="mdEvent.lastModificationTime != null">LastModificationTime,</if> |
|
|
|
<if test="mdEvent.lastModifierUserId != null">LastModifierUserId,</if> |
|
|
|
<if test="mdEvent.isDeleted != null">IsDeleted,</if> |
|
|
|
<if test="mdEvent.deleterUserId != null">DeleterUserId,</if> |
|
|
|
<if test="mdEvent.deletionTime != null">DeletionTime,</if> |
|
|
|
CreationTime, |
|
|
|
</trim> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
<if test="mdEvent.fusionId != null">#{mdEvent.fusionId},</if> |
|
|
|
<if test="mdEvent.eventName != null">#{mdEvent.eventName},</if> |
|
|
|
<if test="mdEvent.eventTypeCode != null">#{mdEvent.eventTypeCode},</if> |
|
|
|
<if test="mdEvent.eventDesc != null">#{mdEvent.eventDesc},</if> |
|
|
|
<if test="mdEvent.occurTime != null">#{mdEvent.occurTime},</if> |
|
|
|
<if test="mdEvent.endTime != null">#{mdEvent.endTime},</if> |
|
|
|
<if test="mdEvent.stakeNumber != null and mdEvent.stakeNumber != ''">#{mdEvent.stakeNumber},</if> |
|
|
|
<if test="mdEvent.longitude != null">#{mdEvent.longitude},</if> |
|
|
|
<if test="mdEvent.latitude != null">#{mdEvent.latitude},</if> |
|
|
|
<if test="mdEvent.lane != null">#{mdEvent.lane},</if> |
|
|
|
<if test="mdEvent.direction != null and mdEvent.direction != ''">#{mdEvent.direction},</if> |
|
|
|
<if test="mdEvent.location != null">#{mdEvent.location},</if> |
|
|
|
<if test="mdEvent.eventSourceCode != null">#{mdEvent.eventSourceCode},</if> |
|
|
|
<if test="mdEvent.eventSource != null">#{mdEvent.eventSource},</if> |
|
|
|
<if test="mdEvent.eventStatus != null">#{mdEvent.eventStatus},</if> |
|
|
|
<if test="mdEvent.eventLevel != null">#{mdEvent.eventLevel},</if> |
|
|
|
<if test="mdEvent.sectionId != null">#{mdEvent.sectionId},</if> |
|
|
|
<if test="mdEvent.eventTypeCode2 != null">#{mdEvent.eventTypeCode2},</if> |
|
|
|
<if test="mdEvent.eventCause != null">#{mdEvent.eventCause},</if> |
|
|
|
<if test="mdEvent.accidentWeather != null">#{mdEvent.accidentWeather},</if> |
|
|
|
<if test="mdEvent.accidentQueue != null">#{mdEvent.accidentQueue},</if> |
|
|
|
<if test="mdEvent.congestionPile != null">#{mdEvent.congestionPile},</if> |
|
|
|
<if test="mdEvent.congestionReason != null">#{mdEvent.congestionReason},</if> |
|
|
|
<if test="mdEvent.controlCategory != null">#{mdEvent.controlCategory},</if> |
|
|
|
<if test="mdEvent.controlReason != null">#{mdEvent.controlReason},</if> |
|
|
|
<if test="mdEvent.controlReasonType != null">#{mdEvent.controlReasonType},</if> |
|
|
|
<if test="mdEvent.controlStation != null">#{mdEvent.controlStation},</if> |
|
|
|
<if test="mdEvent.controlPile != null">#{mdEvent.controlPile},</if> |
|
|
|
<if test="mdEvent.controlStrategy != null">#{mdEvent.controlStrategy},</if> |
|
|
|
<if test="mdEvent.controlType != null">#{mdEvent.controlType},</if> |
|
|
|
<if test="mdEvent.controlVehicleType != null">#{mdEvent.controlVehicleType},</if> |
|
|
|
<if test="mdEvent.creatorUserId != null">#{mdEvent.creatorUserId},</if> |
|
|
|
<if test="mdEvent.lastModificationTime != null">#{mdEvent.lastModificationTime},</if> |
|
|
|
<if test="mdEvent.lastModifierUserId != null">#{mdEvent.lastModifierUserId},</if> |
|
|
|
<if test="mdEvent.isDeleted != null">#{mdEvent.isDeleted},</if> |
|
|
|
<if test="mdEvent.deleterUserId != null">#{mdEvent.deleterUserId},</if> |
|
|
|
<if test="mdEvent.deletionTime != null">#{mdEvent.deletionTime},</if> |
|
|
|
now() |
|
|
|
</trim> |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<update id="updateMiddleDatabaseDeviceInfo" parameterType="MdDevice"> |
|
|
|
update device |
|
|
|
<set> |
|
|
|