insert into tht_hidden_danger_base
(nid,
business_id,
name,
type,
operator,
source,
find_way,
area,
status,
find_time,
pc_start_time,
report_dept,
handle_dept,
delay_count,
delay_day,
pc_count,
last_mod_date
)
values (#{nid},
#{businessId},
#{name},
#{type},
#{operator},
#{source},
#{findWay},
#{area},
#{status},
#{findTime},
#{pcStartTime},
#{reportDept},
#{handleDept},
#{delayCount},
#{delayDay},
#{pcCount},
NOW()
)
insert into tht_hidden_danger_road
(nid,
business_id,
section_code,
pc_count,
last_mod_date
)
values (#{nid},
#{businessId},
#{sectionCode},
#{pcCount},
NOW()
)
insert into tht_hidden_danger_road (nid, business_id,last_mod_date)
values (#{uuid}, #{businessId},NOW())
update tht_hidden_danger_road thdr
set address = #{address},
coordinate = #{coordinate},
last_mod_date = NOW()
where business_id = #{businessId}
update tht_hidden_danger_road
set section_code = #{sectionCode},
last_mod_date = NOW()
where business_id = #{businessId};
update tht_hidden_danger_road thdr
set address = #{address},
coordinate = #{coordinate},
last_mod_date = NOW()
where business_id = #{businessId}
insert into tht_section_info
values (nextval('test_id_seq'),
#{businessId},
#{roadType},
#{roadWidth},
#{laneCount},
#{roadStructure},
#{sideProtec},
#{centerSeparate},
#{designSpeed},
#{limitSpeed})
RETURNING #{businessId};
update tht_section_info
set "ROAD_TYPE" = #{roadType},
"ROAD_WIDTH" = #{roadWidth},
"LANE_COUNT" = #{laneCount},
"ROAD_STRUCTURE" = #{roadStructure},
"SIDE_PROTEC" = #{sideProtec},
"CENTER_SEPARATE" = #{centerSeparate},
"DESIGN_SPEED" = #{designSpeed},
"LIMIT_SPEED" = #{limitSpeed}
where "BUSINESS_ID" = #{businessId}
insert into tht_section_traffic
values (nextval('test_id_seq1'),
#{businessId},
#{passingTrend},
#{maxTraffic},
#{peakTraffic},
#{peakHours},
#{normalTraffic},
#{largeVehicleRate},
#{nonvehicleTraffic},
#{lastModeUser},
#{lastModeDate}
)
update tht_section_traffic
set "PASSING_TREND" = #{passingTrend},
"MAX_TRAFFIC" = #{maxTraffic},
"PEAK_TRAFFIC" = #{peakTraffic},
"PEAK_HOURS" = #{peakHours},
"NORMAL_TRAFFIC" = #{normalTraffic},
"LARGE_VEHICLE_RATE" = #{largeVehicleRate},
"NONVEHICLE_TRAFFIC" = #{nonvehicleTraffic},
"LAST_MOD_USER" = #{lastModeUser},
"LAST_MOD_DATE" = NOW()
where "BUSINESS_ID" = #{businessId}
update tht_hidden_danger_base set
last_mod_date = NOW(), approve_status = '1'
where business_id = #{businessId}
update tht_hidden_danger_road
set hd_flag = #{hdFlag}
, pc_end_time = CURRENT_TIMESTAMP,last_mod_date = NOW()
where business_id = #{businessId}
and pc_count = #{pcCount}
INSERT INTO tht_hidden_data_collect_config_extra (nid, itemid, "order", type, name, standar, unit, business_id)
VALUES (nextval('test_id_seq2'), #{itemid}, #{order}, #{type}, #{name}, #{standar}, #{unit}, #{businessId})
insert into bis_road ("road_code", "road_name", "position","last_mod_date")
values (#{roadCode}, #{roadName}, #{position},NOW())
delete
from tht_hidden_danger_road_info
where business_id = #{businessId}
update tht_hidden_danger_road
set pc_type = #{pcType},last_mod_date = NOW()
where business_id = #{businessId}