提交 90ff8695 authored 作者: Phyday's avatar Phyday

对接翰高数据库(交通量/应急资源/路况)

上级 9ddd3117
......@@ -36,7 +36,7 @@
<select id="getCoordinates" resultMap="teamEquipmentCoordinateMap">
select row_id, longitude, latitude
from `emergency_team_equipment`;
from emergency_team_equipment;
</select>
<insert id="save">
......
......@@ -232,7 +232,7 @@
<select id="getCoordinates" resultMap="teamCoordinateDtoMap">
select row_id, longitude, latitude
from `emergency_team`;
from emergency_team;
</select>
<select id="getGoalTeamVo" resultMap="emergencyMaterialAndEquipmentVoMap">
......
......@@ -39,7 +39,7 @@
<select id="getCoordinates" resultMap="materialHouseCoordinateDtoMap">
select row_id, longitude, latitude
from `material_house`;
from material_house;
</select>
<select id="getTeams" resultMap="teamMap">
......
......@@ -116,34 +116,35 @@
<result property="jtlAmount" column="jtlAmount"/>
<result property="spAmount" column="spAmount"/>
</resultMap>
<!-- <insert id="saveEmergencyUnit">-->
<!-- INSERT INTO roadcondition_emergency ( event_id, emergency_event_id )-->
<!-- values (#{eventId},#{emergencyEventId})-->
<!-- </insert>-->
<insert id="saveEmergencyUnit">
INSERT INTO roadcondition_emergency ( event_id, emergency_event_id )
values (#{eventId},#{emergencyEventId})
</insert>
<select id="getUnitTree" resultMap="SaveUnitMap">
select *
from roadcondition_unit
</select>
<!-- <insert id="saveUnit">-->
<!-- INSERT INTO roadcondition_unit ( unit_id, unit_name )-->
<!-- SELECT start_unit_no, maintain_unit FROM road_condition_event-->
<!-- GROUP BY start_unit_no, maintain_unit-->
<!-- </insert>-->
<insert id="saveUnit">
INSERT INTO roadcondition_unit ( unit_id, unit_name )
SELECT start_unit_no, maintain_unit FROM road_condition_event
GROUP BY start_unit_no, maintain_unit
</insert>
<!-- <delete id="deleteUnitByDept">-->
<!-- delete from roadcondition_emergencyevent where dept_id=#{deptId}-->
<!-- </delete>-->
<delete id="deleteUnitByDept">
delete from roadcondition_emergencyevent where dept_id=#{deptId}
</delete>
<!-- <insert id="saveUnitWithDept">-->
<!-- insert into roadcondition_emergencyevent (dept_id, unit_id) values (#{deptId},#{unit})-->
<!-- </insert>-->
<insert id="saveUnitWithDept">
insert into roadcondition_emergencyevent (dept_id, unit_id) values (#{deptId},#{unit})
</insert>
<select id="getRoadConditionEventPage" resultMap="roadConditionEventMap"
parameterType="com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent">
SELECT rce.*,count(re.event_id) as count
FROM `road_condition_event` rce left join `roadcondition_emergency` re
FROM road_condition_event rce left join roadcondition_emergency re
on (rce.event_id = re.event_id)
<where>
<if test="roadConditionEvent.startUnit != null">maintain_unit like
......@@ -162,7 +163,7 @@
<foreach item="item" collection="units" separator="," open="(" close=")" index="">
#{item}
</foreach>
group by event_id
group by rce.event_id
</where>
</select>
......@@ -192,13 +193,13 @@
</select>
<select id="staticByMonth" resultMap="staticByMonthMap">
SELECT count(*) AS count,
YEAR(start_time) AS year,
MONTH(start_time) AS month
FROM road_condition_event
SELECT count(*) AS count,
to_char(t.start_time,'YYYY') AS year,
to_char(t.start_time,'MM') AS month
FROM road_condition_event t
WHERE event_type = '养护施工信息'
GROUP BY YEAR(start_time),
MONTH(start_time)
GROUP BY to_char(t.start_time,'YYYY'),
to_char(t.start_time,'MM')
</select>
<select id="staticByRoadCode" resultMap="staticByRoadCodeMap">
......@@ -210,8 +211,7 @@
</select>
<select id="staticByCity" resultMap="staticByCityMap">
SELECT count(*) AS count,
# maintain_unit,
SELECT count(*) AS count,
SUBSTRING(maintain_unit FROM 1 FOR 2) as city
FROM road_condition_event
where SUBSTRING(maintain_unit FROM 1 FOR 2) != '山东'
......@@ -244,7 +244,7 @@
<select id="getCoordinates" resultMap="CoordinateDtoMap" parameterType="list">
select event_id, longitude, latitude, event_type,event_title
from `road_condition_event`
from road_condition_event
where start_unit_no in
<foreach item="item" collection="units" separator="," open="(" close=")" index="">
#{item}
......@@ -253,38 +253,38 @@
<select id="getTQCoordinates" resultMap="CoordinateDtoMap">
select event_id, longitude, latitude, event_type, event_title
from `road_condition_event`
from road_condition_event
where event_title = '异常天气';
</select>
<select id="getYHCoordinates" resultMap="roadConditionEventMap">
select event_id, longitude, latitude, event_type, event_title
from `road_condition_event`;
from road_condition_event;
</select>
<select id="getTFCoordinates" resultMap="CoordinateDtoMap">
select event_id, longitude, latitude, event_type, event_title
from `road_condition_event`
from road_condition_event
where event_title = '突发事件';
</select>
<select id="getSFZCoordinates" resultMap="CoordinateDtoMap">
select event_id, longitude, latitude, event_type, event_title
from `road_condition_event`
from road_condition_event
where event_title = '收费站异常';
</select>
<select id="getLKAmount" resultMap="EventAmountMap">
select count(0) as lkAmount
from `road_condition_event`
from road_condition_event
</select>
<select id="getSPAmount" resultMap="EventAmountMap">
select count(0) as spAmount
from `t_szgl_gsd_spdw`
from t_szgl_gsd_spdw
</select>
<select id="getJTLAmount" resultMap="EventAmountMap">
select count(0) as jtlAmount
from `t_szgl_gsd_gcz`
from t_szgl_gsd_gcz
</select>
<select id="selectRoadMaintainEvent"
......
......@@ -30,7 +30,7 @@
</resultMap>
<select id="getTrafficRoadsectionPage" resultMap="trafficRoadsectionMap">
select * from v_traffic_roadsection
select * from t_lwjc_gsd_ldnpjrjtl
<where>
<if test="trafficRoadsection.spotName != null">
spot_name like CONCAT('%',#{trafficRoadsection.spotName},'%')
......
......@@ -31,7 +31,7 @@
<select id="getTrafficRoutePage" resultMap="trafficRouteMap"
parameterType="com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoute">
select * from v_traffic_route
select * from t_lwjc_gsd_lxjtl
<where>
<if test="trafficRoute.roadName != null">
road_name like CONCAT('%',#{trafficRoute.roadName},'%')
......
......@@ -52,13 +52,13 @@
<select id="getCoordinates" resultMap="CoordinateDtoMap">
select id, jd, wd
from `t_szgl_gsd_gcz`
from t_szgl_gsd_gcz
where LENGTH(lxbh)=4;
</select>
<select id="getById" resultMap="trafficSpotMap">
select *
from `t_szgl_gsd_gcz`
from t_szgl_gsd_gcz
where id=#{rowId} and LENGTH(lxbh)=4;
</select>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论