|
|
|
|
@ -117,7 +117,7 @@ |
|
|
|
|
SELECT hdb.*,hdr.pc_type |
|
|
|
|
FROM tht_hidden_danger_base hdb |
|
|
|
|
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 enum_type et ON et.ENUMTYPEID = '6601' |
|
|
|
|
AND et.enumvalue = hdb.status |
|
|
|
|
@ -159,7 +159,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getHigDangerDetail" resultType="com.hisense.hiatmp.model.common.HighDangerBase"> |
|
|
|
|
SELECT DISTINCT hdb.*,hdr.coordinate, hdr.coordinate_type |
|
|
|
|
SELECT DISTINCT hdb.*, hdr.coordinate, hdr.coordinate_type |
|
|
|
|
FROM tht_hidden_danger_base hdb |
|
|
|
|
left join tht_hidden_danger_road hdr on hdr.business_id = hdb.business_id |
|
|
|
|
WHERE hdb.business_id = #{businessId} |
|
|
|
|
@ -171,7 +171,8 @@ |
|
|
|
|
WHERE hdb.name like #{search} |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getAllSection" parameterType="com.hisense.hiatmp.model.common.SectionVO" resultType="com.hisense.hiatmp.model.common.SectionVO"> |
|
|
|
|
<select id="getAllSection" parameterType="com.hisense.hiatmp.model.common.SectionVO" |
|
|
|
|
resultType="com.hisense.hiatmp.model.common.SectionVO"> |
|
|
|
|
SELECT |
|
|
|
|
section_code, |
|
|
|
|
section_name, |
|
|
|
|
@ -190,7 +191,8 @@ |
|
|
|
|
</if> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getAllCrossing" parameterType="com.hisense.hiatmp.model.common.CrossingDTO" resultType="com.hisense.hiatmp.model.common.CrossingDTO"> |
|
|
|
|
<select id="getAllCrossing" parameterType="com.hisense.hiatmp.model.common.CrossingDTO" |
|
|
|
|
resultType="com.hisense.hiatmp.model.common.CrossingDTO"> |
|
|
|
|
SELECT |
|
|
|
|
* |
|
|
|
|
FROM bis_crossing |
|
|
|
|
@ -215,12 +217,10 @@ |
|
|
|
|
|
|
|
|
|
<select id="getRoadInfo" resultType="com.hisense.hiatmp.model.common.HighDangerRoad"> |
|
|
|
|
|
|
|
|
|
SELECT DISTINCT thdb.*,thdr.address,thdr.section_code,thdr.point_type, thdr.coordinate |
|
|
|
|
from |
|
|
|
|
tht_hidden_danger_base thdb |
|
|
|
|
SELECT DISTINCT thdb.*, thdr.address, thdr.section_code, thdr.if_cross, thdr.coordinate |
|
|
|
|
from tht_hidden_danger_base thdb |
|
|
|
|
left join tht_hidden_danger_road thdr on thdr.business_id = thdb.business_id |
|
|
|
|
where |
|
|
|
|
thdb.business_id = #{businessId} |
|
|
|
|
where thdb.business_id = #{businessId} |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="isRoadExist" resultType="int"> |
|
|
|
|
@ -230,7 +230,8 @@ |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<insert id="insertRoad"> |
|
|
|
|
insert into tht_hidden_danger_road (nid,business_id) values (#{uuid}, #{businessId}) |
|
|
|
|
insert into tht_hidden_danger_road (nid, business_id) |
|
|
|
|
values (#{uuid}, #{businessId}) |
|
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
<select id="getImportDanger" resultType="com.hisense.hiatmp.model.common.ImportDangerDTO"> |
|
|
|
|
@ -238,33 +239,31 @@ |
|
|
|
|
from tht_hidden_scenes; |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<!-- <update id="saveSection">--> |
|
|
|
|
<!-- update tht_hidden_danger_road thdr--> |
|
|
|
|
<!-- set--> |
|
|
|
|
<!-- address = #{address},--> |
|
|
|
|
<!-- coordinate = #{coordinate}--> |
|
|
|
|
<!-- where business_id = #{businessId}--> |
|
|
|
|
<!-- </update>--> |
|
|
|
|
<!-- <update id="saveSection">--> |
|
|
|
|
<!-- update tht_hidden_danger_road thdr--> |
|
|
|
|
<!-- set--> |
|
|
|
|
<!-- address = #{address},--> |
|
|
|
|
<!-- coordinate = #{coordinate}--> |
|
|
|
|
<!-- where business_id = #{businessId}--> |
|
|
|
|
<!-- </update>--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="saveSection"> |
|
|
|
|
update tht_hidden_danger_road thdr |
|
|
|
|
set |
|
|
|
|
address = #{address}, |
|
|
|
|
set address = #{address}, |
|
|
|
|
coordinate = #{coordinate} |
|
|
|
|
where business_id = #{businessId} |
|
|
|
|
</update> |
|
|
|
|
|
|
|
|
|
<update id="bindRoad"> |
|
|
|
|
update tht_hidden_danger_road set |
|
|
|
|
section_code = #{sectionCode} |
|
|
|
|
update tht_hidden_danger_road |
|
|
|
|
set section_code = #{sectionCode} |
|
|
|
|
where business_id = #{businessId}; |
|
|
|
|
</update> |
|
|
|
|
|
|
|
|
|
<update id="saveCrossing"> |
|
|
|
|
update tht_hidden_danger_road thdr |
|
|
|
|
set |
|
|
|
|
address = #{address}, |
|
|
|
|
set address = #{address}, |
|
|
|
|
coordinate = #{coordinate} |
|
|
|
|
where business_id = #{businessId} |
|
|
|
|
</update> |
|
|
|
|
@ -301,7 +300,9 @@ |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="isExtraExistence" resultType="com.hisense.hiatmp.model.common.HiddenDangerDTO"> |
|
|
|
|
SELECT * FROM tht_hidden_danger_road_info where business_id = #{businessId} |
|
|
|
|
SELECT * |
|
|
|
|
FROM tht_hidden_danger_road_info |
|
|
|
|
where business_id = #{businessId} |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<insert id="insertSectionInfo"> |
|
|
|
|
@ -370,35 +371,40 @@ |
|
|
|
|
|
|
|
|
|
<insert id="saveHiddenDataCollectConfig"> |
|
|
|
|
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}) |
|
|
|
|
VALUES (nextval('test_id_seq2'), #{itemid}, #{order}, #{type}, #{name}, #{standar}, #{unit}, #{businessId}) |
|
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
<insert id="saveDangerExtra"> |
|
|
|
|
INSERT INTO tht_hidden_danger_road_info (nid, business_id, big_category, small_category, hd_term, hd_desc, |
|
|
|
|
pc_count,hd_pic,hd_info,pc_type) |
|
|
|
|
pc_count, hd_pic, hd_info, pc_type) |
|
|
|
|
VALUES (#{nid}, #{businessId}, #{bigCategory}, #{smallCategory}, #{hdTerm}, |
|
|
|
|
#{hdDesc}, #{pcCount},#{hdPic},#{hdInfo},#{pcType}) |
|
|
|
|
#{hdDesc}, #{pcCount}, #{hdPic}, #{hdInfo}, #{pcType}) |
|
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="saveRoad"> |
|
|
|
|
insert into bis_road ("road_code","road_name","position") values(#{roadCode},#{roadName},#{position}) |
|
|
|
|
insert into bis_road ("road_code", "road_name", "position") |
|
|
|
|
values (#{roadCode}, #{roadName}, #{position}) |
|
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
<delete id="deleteRoadInfo"> |
|
|
|
|
delete from tht_hidden_danger_road_info where business_id = #{businessId} |
|
|
|
|
delete |
|
|
|
|
from tht_hidden_danger_road_info |
|
|
|
|
where business_id = #{businessId} |
|
|
|
|
</delete> |
|
|
|
|
|
|
|
|
|
<delete id="deleteThtHiddenDataCollectConfigExtra"> |
|
|
|
|
delete from tht_hidden_data_collect_config_extra where business_id = #{businessId} |
|
|
|
|
delete |
|
|
|
|
from tht_hidden_data_collect_config_extra |
|
|
|
|
where business_id = #{businessId} |
|
|
|
|
</delete> |
|
|
|
|
|
|
|
|
|
<insert id="saveThtHiddenDataCollectConfigExtra"> |
|
|
|
|
insert into |
|
|
|
|
tht_hidden_data_collect_config_extra |
|
|
|
|
("nid","itemid","order","type","name","standar","unit","business_id","scenes_id","pc_count","danger_id") |
|
|
|
|
values |
|
|
|
|
(nextval('test_id_seq2'),#{itemid},#{order},#{type},#{name},#{standar},#{unit},#{businessId},#{scenesId},#{pcCount},#{dangerId}) |
|
|
|
|
insert into tht_hidden_data_collect_config_extra |
|
|
|
|
("nid", "itemid", "order", "type", "name", "standar", "unit", "business_id", "scenes_id", "pc_count", |
|
|
|
|
"danger_id") |
|
|
|
|
values (nextval('test_id_seq2'), #{itemid}, #{order}, #{type}, #{name}, #{standar}, #{unit}, #{businessId}, |
|
|
|
|
#{scenesId}, #{pcCount}, #{dangerId}) |
|
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
<select id="getImportDangerDisplay" resultType="com.hisense.hiatmp.model.common.ThtHiddenDataCollectConfigExtra"> |
|
|
|
|
@ -406,7 +412,6 @@ |
|
|
|
|
<if test="dangerId != null"> |
|
|
|
|
and danger_id = #{dangerId} |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getImportDangerDisplayItem" resultType="com.hisense.hiatmp.model.common.ImportDangerDTO"> |
|
|
|
|
@ -417,10 +422,11 @@ |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getImportDangerItems" resultType="com.hisense.hiatmp.model.common.ThtDangerItems"> |
|
|
|
|
SELECT * |
|
|
|
|
FROM tht_danger_items tdi |
|
|
|
|
LEFT JOIN tht_scenes_danger_relation tsir ON TRIM(LEADING '0' FROM tsir.dangerid) = tdi.id |
|
|
|
|
WHERE tsir.scenesid = #{nid} |
|
|
|
|
select DISTINCT r.*, i.* |
|
|
|
|
from tht_scenes_danger_relation r |
|
|
|
|
left join tht_danger_items i on r.dangerid = i.id |
|
|
|
|
where r.scenesid = #{nid} |
|
|
|
|
order by r.order |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getUserHiddenDangerList" resultType="com.hisense.hiatmp.model.common.HiddenDangerDTO"> |
|
|
|
|
@ -439,12 +445,9 @@ |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getDangerProblem" resultType="String"> |
|
|
|
|
SELECT DISTINCT |
|
|
|
|
itemname |
|
|
|
|
FROM |
|
|
|
|
tht_danger_items |
|
|
|
|
where |
|
|
|
|
id = #{id} |
|
|
|
|
SELECT DISTINCT itemname |
|
|
|
|
FROM tht_danger_items |
|
|
|
|
where id = #{id} |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<update id="HighDangerSaveStatus"> |
|
|
|
|
|