insert into device_data
devNo,
devType,
`timeStamp`,
expands,
CreatorUserId,
LastModificationTime,
LastModifierUserId,
IsDeleted,
DeleterUserId,
DeletionTime,
CreationTime
#{devNo},
#{devType},
#{timeStamp},
#{expands},
#{creatorUserId},
#{lastModificationTime},
#{isDeleted},
#{deleterUserId},
#{deletionTime},
current_date
insert into event
fusionId,
event_name,
event_type_code,
event_desc,
occur_time,
end_time,
stake_number,
longitude,
latitude,
lane,
direction,
location,
event_source_code,
event_source,
event_status,
event_level,
section_id,
event_type_code2,
event_cause,
accident_weather,
accident_queue,
congestion_pile,
congestion_reason,
control_category,
control_reason,
control_reason_type,
control_station,
control_pile,
control_strategy,
control_type,
control_vehicle_type,
CreatorUserId,
LastModificationTime,
LastModifierUserId,
IsDeleted,
DeleterUserId,
DeletionTime,
CreationTime,
#{fusionId},
#{eventName},
#{eventTypeCode},
#{eventDesc},
#{occurTime},
#{endTime},
#{stakeNumber},
#{longitude},
#{latitude},
#{lane},
#{direction},
#{location},
#{eventSourceCode},
#{eventSource},
#{eventStatus},
#{eventLevel},
#{sectionId},
#{eventTypeCode2},
#{eventCause},
#{accidentWeather},
#{accidentQueue},
#{congestionPile},
#{congestionReason},
#{controlCategory},
#{controlReason},
#{controlReasonType},
#{controlStation},
#{controlPile},
#{controlStrategy},
#{controlType},
#{controlVehicleType},
#{creatorUserId},
#{lastModificationTime},
#{lastModifierUserId},
#{isDeleted},
#{deleterUserId},
#{deletionTime},
now()
insert into device
id,
dev_no,
dev_name,
stake_num,
direction,
type_code,
facilities_type,
dev_status,
opma_manager_id,
opma_manager_name,
supplier_name,
section_id,
CreationTime,
CreatorUserId,
LastModificationTime,
LastModifierUserId,
IsDeleted,
DeleterUserId,
DeletionTime,
#{id},
#{devNo},
#{devName},
#{stakeNum},
#{direction},
#{typeCode},
#{facilitiesType},
#{devStatus},
#{opmaManagerId},
#{opmaManagerName},
#{supplierName},
#{sectionId},
now(),
#{creatorUserId},
#{lastModificationTime},
#{lastModifierUserId},
#{isDeleted},
#{deleterUserId},
#{deletionTime},
insert into device
id,
dev_no,
dev_name,
stake_num,
direction,
type_code,
facilities_type,
dev_status,
opma_manager_id,
opma_manager_name,
supplier_name,
section_id,
CreationTime,
CreatorUserId,
LastModificationTime,
LastModifierUserId,
IsDeleted,
DeleterUserId,
DeletionTime,
#{mdDevice.id},
#{mdDevice.devNo},
#{mdDevice.devName},
#{mdDevice.stakeNum},
#{mdDevice.direction},
#{mdDevice.typeCode},
#{mdDevice.facilitiesType},
#{mdDevice.devStatus},
#{mdDevice.opmaManagerId},
#{mdDevice.opmaManagerName},
#{mdDevice.supplierName},
#{mdDevice.sectionId},
now(),
#{mdDevice.creatorUserId},
#{mdDevice.lastModificationTime},
#{mdDevice.lastModifierUserId},
#{mdDevice.isDeleted},
#{mdDevice.deleterUserId},
#{mdDevice.deletionTime},
ON DUPLICATE KEY UPDATE
dev_no = #{mdDevice.devNo},
dev_name = #{mdDevice.devName},
stake_num = #{mdDevice.stakeNum},
direction = #{mdDevice.direction},
type_code = #{mdDevice.typeCode},
facilities_type = #{mdDevice.facilitiesType},
dev_status = #{mdDevice.devStatus},
opma_manager_id = #{mdDevice.opmaManagerId},
opma_manager_name = #{mdDevice.opmaManagerName},
supplier_name = #{mdDevice.supplierName},
section_id = #{mdDevice.sectionId},
LastModificationTime = now(),
LastModifierUserId = #{mdDevice.lastModifierUserId},
IsDeleted = #{mdDevice.isDeleted},
DeleterUserId = #{mdDevice.deleterUserId},
DeletionTime = #{mdDevice.deletionTime},
insert into event
fusionId,
event_name,
event_type_code,
event_desc,
occur_time,
end_time,
stake_number,
longitude,
latitude,
lane,
direction,
location,
event_source_code,
event_source,
event_status,
event_level,
section_id,
event_type_code2,
event_cause,
accident_weather,
accident_queue,
congestion_pile,
congestion_reason,
control_category,
control_reason,
control_reason_type,
control_station,
control_pile,
control_strategy,
control_type,
control_vehicle_type,
CreatorUserId,
LastModificationTime,
LastModifierUserId,
IsDeleted,
DeleterUserId,
DeletionTime,
CreationTime,
#{mdEvent.fusionId},
#{mdEvent.eventName},
#{mdEvent.eventTypeCode},
#{mdEvent.eventDesc},
#{mdEvent.occurTime},
#{mdEvent.endTime},
#{mdEvent.stakeNumber},
#{mdEvent.longitude},
#{mdEvent.latitude},
#{mdEvent.lane},
#{mdEvent.direction},
#{mdEvent.location},
#{mdEvent.eventSourceCode},
#{mdEvent.eventSource},
#{mdEvent.eventStatus},
#{mdEvent.eventLevel},
#{mdEvent.sectionId},
#{mdEvent.eventTypeCode2},
#{mdEvent.eventCause},
#{mdEvent.accidentWeather},
#{mdEvent.accidentQueue},
#{mdEvent.congestionPile},
#{mdEvent.congestionReason},
#{mdEvent.controlCategory},
#{mdEvent.controlReason},
#{mdEvent.controlReasonType},
#{mdEvent.controlStation},
#{mdEvent.controlPile},
#{mdEvent.controlStrategy},
#{mdEvent.controlType},
#{mdEvent.controlVehicleType},
#{mdEvent.creatorUserId},
#{mdEvent.lastModificationTime},
#{mdEvent.lastModifierUserId},
#{mdEvent.isDeleted},
#{mdEvent.deleterUserId},
#{mdEvent.deletionTime},
now()
update device
dev_no = #{devNo},
dev_name = #{devName},
stake_num = #{stakeNum},
direction = #{direction},
type_code = #{typeCode},
facilities_type = #{facilitiesType},
dev_status = #{devStatus},
opma_manager_id = #{opmaManagerId},
opma_manager_name = #{opmaManagerName},
supplier_name = #{supplierName},
section_id = #{sectionId},
LastModificationTime = now(),
LastModifierUserId = #{lastModifierUserId},
IsDeleted = #{isDeleted},
DeleterUserId = #{deleterUserId},
DeletionTime = #{deletionTime},
where id = #{id}
update device set IsDeleted = '1',DeletionTime = now()
where id in
#{id}
update device set dev_status = #{deviceState} where dev_no = #{iotDeviceId}
update event
fusionId = #{fusionId},
event_name = #{eventName},
event_type_code = #{eventTypeCode},
event_desc = #{eventDesc},
occur_time = #{occurTime},
end_time = #{endTime},
stake_number = #{stakeNumber},
longitude = #{longitude},
latitude = #{latitude},
lane = #{lane},
direction = #{direction},
location = #{location},
event_source_code = #{eventSourceCode},
event_source = #{eventSource},
event_status = #{eventStatus},
event_level = #{eventLevel},
section_id = #{sectionId},
event_type_code2 = #{eventTypeCode2},
event_cause = #{eventCause},
accident_weather = #{accidentWeather},
accident_queue = #{accidentQueue},
congestion_pile = #{congestionPile},
congestion_reason = #{congestionReason},
control_category = #{controlCategory},
control_reason = #{controlReason},
control_reason_type = #{controlReasonType},
control_station = #{controlStation},
control_pile = #{controlPile},
control_strategy = #{controlStrategy},
control_type = #{controlType},
control_vehicle_type = #{controlVehicleType},
LastModificationTime = now(),
LastModifierUserId = #{lastModifierUserId},
IsDeleted = #{isDeleted},
DeleterUserId = #{deleterUserId},
DeletionTime = #{deletionTime},
where id = #{id}