726问题修改

master
Zangzhipeng 1 year ago
parent 0f3602737b
commit cab2c6d8b9
  1. 18
      hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/controller/HighDangerController.java
  2. 123
      hiatmp-hidden-danger-server/src/main/resources/sql-mapper/HighDangerMapper.xml
  3. 2
      hiatmp-model/src/main/java/com/hisense/hiatmp/model/common/HighDangerRoad.java

@ -110,6 +110,15 @@ public class HighDangerController {
base.setDeadlineType("1");
continue;
}
if(diffDays == 0){
base.setDeadlineStatus("超期" + remainingHours + "小时");
base.setDeadlineType("2");
continue;
}else if(remainingHours == 0){
base.setDeadlineStatus("超期" + diffDays + "天");
base.setDeadlineType("2");
continue;
}
base.setDeadline(diffDays);
base.setDeadlineStatus("超期" + diffDays + "天" + remainingHours + "小时");
base.setDeadlineType("1");
@ -120,6 +129,15 @@ public class HighDangerController {
continue;
}
base.setDeadline(diffDays);
if(diffDays == 0){
base.setDeadlineStatus("临期" + remainingHours + "小时");
base.setDeadlineType("2");
continue;
}else if(remainingHours == 0){
base.setDeadlineStatus("临期" + diffDays + "天");
base.setDeadlineType("2");
continue;
}
base.setDeadlineStatus("临期" + diffDays + "天" + remainingHours + "小时");
base.setDeadlineType("2");
} else { // 正常

@ -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,9 +159,9 @@
<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
left join tht_hidden_danger_road hdr on hdr.business_id = hdb.business_id
WHERE hdb.business_id = #{businessId}
</select>
@ -171,15 +171,16 @@
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,
road_code,
width,
length,
area_code,
position
section_code,
section_name,
road_code,
width,
length,
area_code,
position
FROM bis_section
where 1 = 1
<if test="search != null and search != ''">
@ -190,9 +191,10 @@
</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
where 1 = 1
<if test="search != null and search != ''">
@ -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
left join tht_hidden_danger_road thdr on thdr.business_id = thdb.business_id
where
thdb.business_id = #{businessId}
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}
</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,21 +422,22 @@
</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">
SELECT
*
*
FROM
tht_hidden_danger_road_info
tht_hidden_danger_road_info
where
business_id = #{businessId}
business_id = #{businessId}
and
pc_type = #{pcType}
pc_type = #{pcType}
<if test="hdTerm != null and hdTerm != ''">
AND hd_term = #{hdTerm}
</if>
@ -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">

@ -53,6 +53,8 @@ public class HighDangerRoad implements Serializable {
private String pointType;
private String ifCross;
/**
* pc_start_time
*/

Loading…
Cancel
Save