重点区域场景添加获取图片接口

This commit is contained in:
wuweida 2022-08-26 11:26:06 +08:00
parent decd36651a
commit f7c4d8b6c3
7 changed files with 31 additions and 13 deletions

View File

@ -301,5 +301,17 @@ public class KeyAreaController {
return success;
}
/**
* 查询重点区域抓图照片
* @return
*/
@GetMapping("selectByAreaImage")
@ApiOperation("查询重点区域抓图照片")
public Result selectByAreaImage(String areaName){
List<KeyAreaDto> keyAreaDtos = keyAreaMapper.selectByAreaImage(areaName);
Result success = Result.success(keyAreaDtos);
return success;
}
}

View File

@ -33,4 +33,10 @@ public class KeyAreaDto {
private String point;
private String channelCode;
private String channelName;
private String picUrl;
}

View File

@ -25,4 +25,8 @@ public class KeyArea {
private String about;//简介
private String channelCode;
private String channelName;
}

View File

@ -47,4 +47,7 @@ public interface KeyAreaMapper extends BaseMapper<KeyArea> {
List<KeyAreaDtos> selectLocalMonthArea(@Param("areaName") String areaName);
@Select("select * from t_key_area ka LEFT JOIN t_channel_picture cp ON ka.channel_code = cp.channel_code where ka.area_name = #{areaName} ")
List<KeyAreaDto> selectByAreaImage(@Param("areaName") String areaName);
}

View File

@ -271,7 +271,7 @@ public class MonitorService{
log.info("[monitor-capture]: start capture");
List<ChannelLabelDto> labels = cameraChannelMapper.selectLabelAndChannel("1006,1004");
List<ChannelLabelDto> labels = cameraChannelMapper.selectLabelAndChannel("1006,1004,1001");
labels.forEach(label -> {
String channelCode = label.getChannelCode();
try {

View File

@ -4,7 +4,7 @@
<select id="selectKeyAreaList" 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,ss.allNums,ss.localNums,ss.nonlocalNums
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,
SUM(pf.nonlocal_nums) AS nonlocalNums
@ -16,7 +16,7 @@
UNION
SELECT * FROM
(SELECT ka.type,ka.location,ka.service_time,ka.management,ka.scenic_level,
ka.about,ka.area_id,ka.area_name,ss.allNums,ss.localNums,ss.nonlocalNums
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,
SUM(pf.nonlocal_nums) AS nonlocalNums
@ -28,7 +28,7 @@
UNION
SELECT * FROM
(SELECT ka.type,ka.location,ka.service_time,ka.management,ka.scenic_level,
ka.about,ka.area_id,ka.area_name,ss.allNums,ss.localNums,ss.nonlocalNums
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,
SUM(pf.nonlocal_nums) AS nonlocalNums
@ -41,7 +41,7 @@
<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,ss.allNums,ss.localNums,ss.nonlocalNums
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,
SUM(pf.nonlocal_nums) AS nonlocalNums

View File

@ -1,19 +1,12 @@
package com.hisense.monitormanage;
import cn.hutool.crypto.SecureUtil;
import com.alibaba.fastjson.JSONObject;
import com.hisense.monitormanage.entity.PassengerFlow;
import com.hisense.monitormanage.entity.RoadData;
import com.hisense.monitormanage.service.*;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@SpringBootTest
class MonitorManageApplicationTests {
@ -32,7 +25,7 @@ class MonitorManageApplicationTests {
@Test
void contextLoads() {
qidiService.resCatalogApplyHJWSZY();
monitorService.buildingImage();
}
@Test