diff --git a/hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/controller/HighDangerController.java b/hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/controller/HighDangerController.java index a012fc5..4c05667 100644 --- a/hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/controller/HighDangerController.java +++ b/hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/controller/HighDangerController.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 { // 正常 diff --git a/hiatmp-hidden-danger-server/src/main/resources/sql-mapper/HighDangerMapper.xml b/hiatmp-hidden-danger-server/src/main/resources/sql-mapper/HighDangerMapper.xml index bbabde3..4d46a49 100644 --- a/hiatmp-hidden-danger-server/src/main/resources/sql-mapper/HighDangerMapper.xml +++ b/hiatmp-hidden-danger-server/src/main/resources/sql-mapper/HighDangerMapper.xml @@ -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 @@ @@ -171,15 +171,16 @@ WHERE hdb.name like #{search} - 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 @@ -190,9 +191,10 @@ - SELECT - * + * FROM bis_crossing where 1 = 1 @@ -215,12 +217,10 @@ - insert into tht_hidden_danger_road (nid,business_id) values (#{uuid}, #{businessId}) + insert into tht_hidden_danger_road (nid, business_id) + values (#{uuid}, #{businessId}) - - - - - - - + + + + + + + update tht_hidden_danger_road thdr - set - address = #{address}, + set address = #{address}, coordinate = #{coordinate} where business_id = #{businessId} - update tht_hidden_danger_road set - section_code = #{sectionCode} + update tht_hidden_danger_road + set section_code = #{sectionCode} where business_id = #{businessId}; update tht_hidden_danger_road thdr - set - address = #{address}, + set address = #{address}, coordinate = #{coordinate} where business_id = #{businessId} @@ -301,7 +300,9 @@ @@ -370,35 +371,40 @@ 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 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 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}) - delete from tht_hidden_danger_road_info where business_id = #{businessId} + delete + from tht_hidden_danger_road_info + where business_id = #{businessId} - delete from tht_hidden_data_collect_config_extra where business_id = #{businessId} + delete + from tht_hidden_data_collect_config_extra + where business_id = #{businessId} - 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}) diff --git a/hiatmp-model/src/main/java/com/hisense/hiatmp/model/common/HighDangerRoad.java b/hiatmp-model/src/main/java/com/hisense/hiatmp/model/common/HighDangerRoad.java index 9bd5dd9..438beba 100644 --- a/hiatmp-model/src/main/java/com/hisense/hiatmp/model/common/HighDangerRoad.java +++ b/hiatmp-model/src/main/java/com/hisense/hiatmp/model/common/HighDangerRoad.java @@ -53,6 +53,8 @@ public class HighDangerRoad implements Serializable { private String pointType; + private String ifCross; + /** * pc_start_time */