|
|
|
@ -115,14 +115,21 @@ |
|
|
|
<select id="getHigDangerDealt" resultType="com.hisense.hiatmp.model.common.HighDangerBase"> |
|
|
|
<select id="getHigDangerDealt" resultType="com.hisense.hiatmp.model.common.HighDangerBase"> |
|
|
|
SELECT * |
|
|
|
SELECT * |
|
|
|
FROM tht_hidden_danger_base hdb |
|
|
|
FROM tht_hidden_danger_base hdb |
|
|
|
LEFT JOIN tht_hidden_danger_road hdr ON hdb.business_id = hdr.business_id |
|
|
|
LEFT JOIN tht_hidden_danger_road hdr ON hdb.business_id = hdr.business_id |
|
|
|
AND hdb.pc_count = hdr.pc_count |
|
|
|
AND hdb.pc_count = hdr.pc_count |
|
|
|
LEFT JOIN department dp ON hdb.handle_dept = dp.cdepartmentid |
|
|
|
LEFT JOIN department dp ON hdb.handle_dept = dp.cdepartmentid |
|
|
|
LEFT JOIN enum_type et ON et.ENUMTYPEID = '6601' |
|
|
|
LEFT JOIN enum_type et ON et.ENUMTYPEID = '6601' |
|
|
|
AND et.enumvalue = hdb.status |
|
|
|
AND et.enumvalue = hdb.status |
|
|
|
WHERE hdb.handle_dept = #{cdepartmentid} |
|
|
|
WHERE hdb.handle_dept = #{cdepartmentid} |
|
|
|
AND hdb.status = #{status} |
|
|
|
<if test="status != null and status != ''"> |
|
|
|
ORDER BY hdb.PC_END_TIME DESC |
|
|
|
AND hdb.status = #{status} |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
-- ORDER BY hdb.PC_END_TIME::timestamp DESC |
|
|
|
|
|
|
|
ORDER BY |
|
|
|
|
|
|
|
CASE |
|
|
|
|
|
|
|
WHEN hdb.PC_END_TIME IS NULL THEN 1 |
|
|
|
|
|
|
|
ELSE 0 |
|
|
|
|
|
|
|
END, hdb.PC_END_TIME DESC |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="getHigDangerDying" resultType="com.hisense.hiatmp.model.common.HighDangerBase"> |
|
|
|
<select id="getHigDangerDying" resultType="com.hisense.hiatmp.model.common.HighDangerBase"> |
|
|
|
@ -234,8 +241,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertSectionInfo"> |
|
|
|
<insert id="insertSectionInfo"> |
|
|
|
insert into tht_section_info |
|
|
|
insert into tht_section_info |
|
|
|
values ( |
|
|
|
values (nextval('test_id_seq'), |
|
|
|
nextval('test_id_seq'), |
|
|
|
|
|
|
|
#{businessId}, |
|
|
|
#{businessId}, |
|
|
|
#{roadType}, |
|
|
|
#{roadType}, |
|
|
|
#{roadWidth}, |
|
|
|
#{roadWidth}, |
|
|
|
@ -244,31 +250,27 @@ |
|
|
|
#{sideProtec}, |
|
|
|
#{sideProtec}, |
|
|
|
#{centerSeparate}, |
|
|
|
#{centerSeparate}, |
|
|
|
#{designSpeed}, |
|
|
|
#{designSpeed}, |
|
|
|
#{limitSpeed} |
|
|
|
#{limitSpeed}) |
|
|
|
) |
|
|
|
|
|
|
|
RETURNING #{businessId}; |
|
|
|
RETURNING #{businessId}; |
|
|
|
</insert> |
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateSectionInfo"> |
|
|
|
<update id="updateSectionInfo"> |
|
|
|
update tht_section_info |
|
|
|
update tht_section_info |
|
|
|
set |
|
|
|
set "ROAD_TYPE" = #{roadType}, |
|
|
|
"ROAD_TYPE" = #{roadType}, |
|
|
|
"ROAD_WIDTH" = #{roadWidth}, |
|
|
|
"ROAD_WIDTH" = #{roadWidth}, |
|
|
|
"LANE_COUNT" = #{laneCount}, |
|
|
|
"LANE_COUNT" = #{laneCount}, |
|
|
|
"ROAD_STRUCTURE" = #{roadStructure}, |
|
|
|
"ROAD_STRUCTURE" = #{roadStructure}, |
|
|
|
"SIDE_PROTEC" = #{sideProtec}, |
|
|
|
"SIDE_PROTEC" = #{sideProtec}, |
|
|
|
|
|
|
|
"CENTER_SEPARATE" = #{centerSeparate}, |
|
|
|
"CENTER_SEPARATE" = #{centerSeparate}, |
|
|
|
"DESIGN_SPEED" = #{designSpeed}, |
|
|
|
"DESIGN_SPEED" = #{designSpeed}, |
|
|
|
"LIMIT_SPEED" = #{limitSpeed} |
|
|
|
"LIMIT_SPEED" = #{limitSpeed} |
|
|
|
where |
|
|
|
where "BUSINESS_ID" = #{businessId} |
|
|
|
"BUSINESS_ID" = #{businessId} |
|
|
|
|
|
|
|
</update> |
|
|
|
</update> |
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertSectionTraffic"> |
|
|
|
<insert id="insertSectionTraffic"> |
|
|
|
insert into tht_section_traffic |
|
|
|
insert into tht_section_traffic |
|
|
|
values ( |
|
|
|
values (nextval('test_id_seq1'), |
|
|
|
nextval('test_id_seq1'), |
|
|
|
|
|
|
|
#{businessId}, |
|
|
|
#{businessId}, |
|
|
|
#{passingTrend}, |
|
|
|
#{passingTrend}, |
|
|
|
#{maxTraffic}, |
|
|
|
#{maxTraffic}, |
|
|
|
@ -278,42 +280,41 @@ |
|
|
|
#{largeVehicleRate}, |
|
|
|
#{largeVehicleRate}, |
|
|
|
#{vehicleTraffic}, |
|
|
|
#{vehicleTraffic}, |
|
|
|
#{lastModeUser}, |
|
|
|
#{lastModeUser}, |
|
|
|
#{lastModeDate} |
|
|
|
#{lastModeDate}) |
|
|
|
) |
|
|
|
|
|
|
|
</insert> |
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
|
|
<update id="updateSectionTraffic"> |
|
|
|
<update id="updateSectionTraffic"> |
|
|
|
update tht_section_traffic |
|
|
|
update tht_section_traffic |
|
|
|
set |
|
|
|
set "PASSING_TREND" = #{passingTrend}, |
|
|
|
"PASSING_TREND" = #{passingTrend}, |
|
|
|
"MAX_TRAFFIC" = #{maxTraffic}, |
|
|
|
"MAX_TRAFFIC" = #{maxTraffic}, |
|
|
|
"PEAK_TRAFFIC" = #{peakTraffic}, |
|
|
|
"PEAK_TRAFFIC" = #{peakTraffic}, |
|
|
|
"PEAK_HOURS" = #{peakHours}, |
|
|
|
"PEAK_HOURS" = #{peakHours}, |
|
|
|
"NORMAL_TRAFFIC" = #{normalTraffic}, |
|
|
|
"NORMAL_TRAFFIC" = #{normalTraffic}, |
|
|
|
|
|
|
|
"LARGE_VEHICLE_RATE" = #{largeVehicleRate}, |
|
|
|
"LARGE_VEHICLE_RATE" = #{largeVehicleRate}, |
|
|
|
"NONVEHICLE_TRAFFIC" = #{vehicleTraffic}, |
|
|
|
"NONVEHICLE_TRAFFIC" = #{vehicleTraffic}, |
|
|
|
"LAST_MOD_USER" = #{lastModeUser}, |
|
|
|
"LAST_MOD_USER" = #{lastModeUser}, |
|
|
|
"LAST_MOD_DATE" = #{lastModeDate} |
|
|
|
"LAST_MOD_DATE" = #{lastModeDate} |
|
|
|
where |
|
|
|
where "BUSINESS_ID" = #{businessId} |
|
|
|
"BUSINESS_ID" = #{businessId} |
|
|
|
|
|
|
|
</update> |
|
|
|
</update> |
|
|
|
|
|
|
|
|
|
|
|
<update id="updateTemporary"> |
|
|
|
<update id="updateTemporary"> |
|
|
|
update tht_hidden_danger_base |
|
|
|
update tht_hidden_danger_base |
|
|
|
set |
|
|
|
set status = '99' |
|
|
|
status = '99' |
|
|
|
where business_id = #{businessId} |
|
|
|
where |
|
|
|
|
|
|
|
business_id = #{businessId} |
|
|
|
|
|
|
|
</update> |
|
|
|
</update> |
|
|
|
|
|
|
|
|
|
|
|
<insert id="saveHiddenDataCollectConfig"> |
|
|
|
<insert id="saveHiddenDataCollectConfig"> |
|
|
|
INSERT INTO tht_hidden_data_collect_config_copy2 (nid, itemid, order, type, name, standar, unit, pic1_address, pic2_address) |
|
|
|
INSERT INTO tht_hidden_data_collect_config_copy2 (nid, itemid, order, type, name, standar, unit, pic1_address, |
|
|
|
VALUES (nextval('test_id_seq2'),, #{itemid}, #{order}, #{type}, #{name}, #{standar}, #{unit}, #{pic1Address}, #{pic2Address}) |
|
|
|
pic2_address) |
|
|
|
|
|
|
|
VALUES (nextval('test_id_seq2'), , #{itemid}, #{order}, #{type}, #{name}, #{standar}, #{unit}, #{pic1Address}, |
|
|
|
|
|
|
|
#{pic2Address}) |
|
|
|
</insert> |
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
|
|
<insert id="saveDangerExtra"> |
|
|
|
<insert id="saveDangerExtra"> |
|
|
|
INSERT INTO tht_hidden_danger_extra (nid, key_investigation, danger_item, danger_desc, image_list, information, business_id) |
|
|
|
INSERT INTO tht_hidden_danger_extra (nid, key_investigation, danger_item, danger_desc, image_list, information, |
|
|
|
VALUES (nextval('test_id_seq3'),, #{key_investigation}, #{danger_item}, #{danger_desc}, #{image_list}, #{information}, #{business_id}) |
|
|
|
business_id) |
|
|
|
|
|
|
|
VALUES (nextval('test_id_seq3'), , #{key_investigation}, #{danger_item}, #{danger_desc}, #{image_list}, |
|
|
|
|
|
|
|
#{information}, #{business_id}) |
|
|
|
</insert> |
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
|
</mapper> |