Merge branch 'master' of http://192.168.124.50/wangliwen/monitor-manage
* 'master' of http://192.168.124.50/wangliwen/monitor-manage: 。。。
This commit is contained in:
commit
0653ec5685
|
@ -1,6 +1,5 @@
|
|||
package com.hisense.monitormanage.controller;
|
||||
|
||||
import com.hisense.monitormanage.dto.BuildingRecordsDtos;
|
||||
import com.hisense.monitormanage.dto.EventDto;
|
||||
import com.hisense.monitormanage.dto.KeyAreaDto;
|
||||
import com.hisense.monitormanage.dto.KeyAreaDtos;
|
||||
|
@ -67,7 +66,7 @@ public class KeyAreaController {
|
|||
*/
|
||||
@GetMapping("selectKeyArea")
|
||||
@ApiOperation("根据区域类型查询区域的最新时间的人数")
|
||||
public Result selectKeyArea(String type) {
|
||||
public Result selectKeyArea(String type, String area_name) {
|
||||
PassengerFlow maxId = passengerFlowMapper.getByMaxId();
|
||||
String timeId = maxId.getTimeId();
|
||||
List<KeyAreaDto> keyAreaDtos = keyAreaMapper.selectKeyArea(type, timeId);
|
||||
|
|
|
@ -39,4 +39,8 @@ public class KeyAreaDto {
|
|||
|
||||
private String picUrl;
|
||||
|
||||
private String phone; // 联系电话
|
||||
|
||||
private String manager; // 负责人
|
||||
|
||||
}
|
||||
|
|
|
@ -29,4 +29,8 @@ public class KeyArea {
|
|||
|
||||
private String channelName;
|
||||
|
||||
private String phone; // 联系电话
|
||||
|
||||
private String manager; // 负责人
|
||||
|
||||
}
|
||||
|
|
|
@ -39,16 +39,43 @@
|
|||
LEFT JOIN t_key_area_location kal ON kal.area_id = a.area_id
|
||||
</select>
|
||||
<select id="selectKeyArea" resultType="com.hisense.monitormanage.dto.KeyAreaDto">
|
||||
SELECT * FROM
|
||||
(SELECT ka.type,ka.location,ka.service_time,ka.management,ka.scenic_level,
|
||||
ka.about,ka.area_id,ka.area_name,ka.channel_code,ka.channel_name,ss.allNums,ss.localNums,ss.nonlocalNums
|
||||
FROM t_key_area ka LEFT JOIN
|
||||
(SELECT pt.area_name,SUM(pf.all_nums) AS allNums,SUM(pf.local_nums) AS localNums,
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ka.type,
|
||||
ka.location,
|
||||
ka.service_time,
|
||||
ka.management,
|
||||
ka.scenic_level,
|
||||
ka.about,
|
||||
ka.area_id,
|
||||
ka.area_name,
|
||||
ka.channel_code,
|
||||
ka.channel_name,
|
||||
ka.phone,
|
||||
ka.manager,
|
||||
ss.allNums,
|
||||
ss.localNums,
|
||||
ss.nonlocalNums
|
||||
FROM
|
||||
t_key_area ka
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
pt.area_name,
|
||||
SUM( pf.all_nums ) AS allNums,
|
||||
SUM( pf.local_nums ) AS localNums,
|
||||
SUM( pf.nonlocal_nums ) AS nonlocalNums
|
||||
FROM t_passenger_flow pf JOIN t_passenger_test pt
|
||||
ON pf.longitude = pt.longitude AND pf.latitude = pt.latitude
|
||||
WHERE pf.time_id = #{timeId} AND pt.type = #{type} GROUP BY pt.area_name)
|
||||
ss ON ka.area_name = ss.area_name WHERE ka.type = #{type}) a
|
||||
FROM
|
||||
t_passenger_flow pf
|
||||
JOIN t_passenger_test pt ON pf.longitude = pt.longitude
|
||||
AND pf.latitude = pt.latitude
|
||||
WHERE
|
||||
pf.time_id = #{timeId} AND pt.type = #{type} GROUP BY pt.area_name)
|
||||
ss ON ka.area_name = ss.area_name
|
||||
WHERE
|
||||
ka.type = #{type}) a
|
||||
LEFT JOIN t_key_area_location kal ON kal.area_id = a.area_id
|
||||
</select>
|
||||
<select id="selectByAreaEvent" resultType="com.hisense.monitormanage.dto.EventDto">
|
||||
|
|
Loading…
Reference in New Issue