parent
720a57d40d
commit
ec821744db
|
@ -4,7 +4,9 @@ import com.hisense.monitormanage.dto.BuildingRecordsDto;
|
||||||
import com.hisense.monitormanage.dto.BuildingRecordsDtos;
|
import com.hisense.monitormanage.dto.BuildingRecordsDtos;
|
||||||
import com.hisense.monitormanage.entity.BuildingRecords;
|
import com.hisense.monitormanage.entity.BuildingRecords;
|
||||||
import com.hisense.monitormanage.entity.Result;
|
import com.hisense.monitormanage.entity.Result;
|
||||||
|
import com.hisense.monitormanage.entity.RoadData;
|
||||||
import com.hisense.monitormanage.mapper.BuildingRecordsMapper;
|
import com.hisense.monitormanage.mapper.BuildingRecordsMapper;
|
||||||
|
import com.hisense.monitormanage.mapper.RoadDataMapper;
|
||||||
import com.hisense.monitormanage.service.BuildingRecordsService;
|
import com.hisense.monitormanage.service.BuildingRecordsService;
|
||||||
import com.hisense.monitormanage.utils.LongLatUtil;
|
import com.hisense.monitormanage.utils.LongLatUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
@ -17,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -39,6 +42,9 @@ public class BuildingController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private BuildingRecordsMapper buildingRecordsMapper;
|
private BuildingRecordsMapper buildingRecordsMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RoadDataMapper roadDataMapper;
|
||||||
|
|
||||||
@GetMapping("/getRecords")
|
@GetMapping("/getRecords")
|
||||||
@ApiOperation("测试,获取工地实时数据--调用接口")
|
@ApiOperation("测试,获取工地实时数据--调用接口")
|
||||||
public List<Map> getRecords(){
|
public List<Map> getRecords(){
|
||||||
|
@ -73,8 +79,8 @@ public class BuildingController {
|
||||||
@GetMapping("selectAllBuilding")
|
@GetMapping("selectAllBuilding")
|
||||||
@ApiOperation("查询所有工地")
|
@ApiOperation("查询所有工地")
|
||||||
public Result selectAllBuilding(){
|
public Result selectAllBuilding(){
|
||||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectAllBuilding();
|
List<BuildingRecordsDto> records = buildingRecordsMapper.selectAllBuilding();
|
||||||
Result success = Result.success(recordsDtos);
|
Result success = Result.success(records);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,14 +109,14 @@ public class BuildingController {
|
||||||
@GetMapping("selectMonthPmAndNoice")
|
@GetMapping("selectMonthPmAndNoice")
|
||||||
@ApiOperation("查询近30天工地噪声和扬尘的信息")
|
@ApiOperation("查询近30天工地噪声和扬尘的信息")
|
||||||
public Result selectMonthPmAndNoice(String buildLicense){
|
public Result selectMonthPmAndNoice(String buildLicense){
|
||||||
List<BuildingRecordsDtos> recordsDtos = buildingRecordsMapper.selectMonthPmAndNoice(buildLicense);
|
List<BuildingRecordsDtos> records = buildingRecordsMapper.selectMonthPmAndNoice(buildLicense);
|
||||||
recordsDtos.forEach(record ->{
|
records.forEach(record ->{
|
||||||
if (record.getPm10() == null && record.getNoice() == null){
|
if (record.getPm10() == null && record.getNoice() == null){
|
||||||
record.setPm10(0);
|
record.setPm10(0);
|
||||||
record.setNoice(0);
|
record.setNoice(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Result success = Result.success(recordsDtos);
|
Result success = Result.success(records);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,11 +127,10 @@ public class BuildingController {
|
||||||
@GetMapping("selectRaise")
|
@GetMapping("selectRaise")
|
||||||
@ApiOperation("查询工地扬尘事件")
|
@ApiOperation("查询工地扬尘事件")
|
||||||
public Result selectRaise(Integer page,Integer pageSize){
|
public Result selectRaise(Integer page,Integer pageSize){
|
||||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectRaise(page,pageSize);
|
List<BuildingRecordsDto> records = buildingRecordsMapper.selectRaise(page,pageSize);
|
||||||
Integer integer = buildingRecordsMapper.selectCountRaise();
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("sum",integer);
|
map.put("sum",records.size());
|
||||||
map.put("data",recordsDtos);
|
map.put("data",records);
|
||||||
Result success = Result.success(map);
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
@ -137,11 +142,10 @@ public class BuildingController {
|
||||||
@GetMapping("selectNoiceEvent")
|
@GetMapping("selectNoiceEvent")
|
||||||
@ApiOperation("查询工地噪声事件")
|
@ApiOperation("查询工地噪声事件")
|
||||||
public Result selectNoiceEvent(Integer page,Integer pageSize){
|
public Result selectNoiceEvent(Integer page,Integer pageSize){
|
||||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectNoiceEvent(page,pageSize);
|
List<BuildingRecordsDto> records = buildingRecordsMapper.selectNoiceEvent(page,pageSize);
|
||||||
Integer integer = buildingRecordsMapper.selectCountNoice();
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("sum",integer);
|
map.put("sum",records.size());
|
||||||
map.put("data",recordsDtos);
|
map.put("data",records);
|
||||||
Result success = Result.success(map);
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
@ -155,8 +159,8 @@ public class BuildingController {
|
||||||
@ApiOperation("根据工地名称搜索工地")
|
@ApiOperation("根据工地名称搜索工地")
|
||||||
@ApiImplicitParam(name = "projectName", value = "工地名称",required = true,dataType ="String")
|
@ApiImplicitParam(name = "projectName", value = "工地名称",required = true,dataType ="String")
|
||||||
public Result selectByProjectName(String projectName){
|
public Result selectByProjectName(String projectName){
|
||||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectByProjectName(projectName);
|
List<BuildingRecordsDto> records = buildingRecordsMapper.selectByProjectName(projectName);
|
||||||
Result success = Result.success(recordsDtos);
|
Result success = Result.success(records);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,5 +185,52 @@ public class BuildingController {
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当天扬尘事件
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectByDayRaise")
|
||||||
|
@ApiOperation("查询当天扬尘事件")
|
||||||
|
public Result selectByDayRaise(){
|
||||||
|
List<BuildingRecordsDto> records = buildingRecordsMapper.selectByDayRaise();
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
map.put("sum",records.size());
|
||||||
|
map.put("data",records);
|
||||||
|
Result success = Result.success(map);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当天噪声事件
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectByDayNoice")
|
||||||
|
@ApiOperation("查询当天噪声事件")
|
||||||
|
public Result selectByDayNoice(){
|
||||||
|
List<BuildingRecordsDto> records = buildingRecordsMapper.selectByDayNoice();
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
map.put("sum",records.size());
|
||||||
|
map.put("data",records);
|
||||||
|
Result success = Result.success(map);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当天道路污染事件
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectByDayRoadData")
|
||||||
|
@ApiOperation("查询当天道路污染事件")
|
||||||
|
public Result selectByDayRoadData(){
|
||||||
|
RoadData byMaxId = roadDataMapper.getByMaxId();
|
||||||
|
String dt = byMaxId.getDt();
|
||||||
|
List<RoadData> roadData = buildingRecordsMapper.selectByDayRoadData(dt);
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
map.put("sum",roadData.size());
|
||||||
|
map.put("data",roadData);
|
||||||
|
Result success = Result.success(map);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,9 +208,8 @@ public class EventController {
|
||||||
for (EventDto list: lists) {
|
for (EventDto list: lists) {
|
||||||
list.setEventNewName("环境卫生");
|
list.setEventNewName("环境卫生");
|
||||||
}
|
}
|
||||||
Integer integer = eventMapper.selectCountByName("'塑料篮子','纸箱','街头散落垃圾'");
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("sum",integer);
|
map.put("sum",lists.size());
|
||||||
map.put("events",lists);
|
map.put("events",lists);
|
||||||
Result success = Result.success(map);
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
|
@ -219,9 +218,8 @@ public class EventController {
|
||||||
for (EventDto list: lists) {
|
for (EventDto list: lists) {
|
||||||
list.setEventNewName("占道经营");
|
list.setEventNewName("占道经营");
|
||||||
}
|
}
|
||||||
Integer integer = eventMapper.selectCountByName("'街头伞篷','水果和食品摊','地摊','户外桌椅'");
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("sum",integer);
|
map.put("sum",lists.size());
|
||||||
map.put("events",lists);
|
map.put("events",lists);
|
||||||
Result success = Result.success(map);
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
|
@ -230,9 +228,8 @@ public class EventController {
|
||||||
for (EventDto list: lists) {
|
for (EventDto list: lists) {
|
||||||
list.setEventNewName("沿街晾晒");
|
list.setEventNewName("沿街晾晒");
|
||||||
}
|
}
|
||||||
Integer integer = eventMapper.selectCountByName("'沿街晾晒衣物被单'");
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("sum",integer);
|
map.put("sum",lists.size());
|
||||||
map.put("events",lists);
|
map.put("events",lists);
|
||||||
Result success = Result.success(map);
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
|
@ -241,9 +238,8 @@ public class EventController {
|
||||||
for (EventDto list: lists) {
|
for (EventDto list: lists) {
|
||||||
list.setEventNewName("违章停车");
|
list.setEventNewName("违章停车");
|
||||||
}
|
}
|
||||||
Integer integer = eventMapper.selectCountByName("'机动车违停'");
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("sum",integer);
|
map.put("sum",lists.size());
|
||||||
map.put("events",lists);
|
map.put("events",lists);
|
||||||
Result success = Result.success(map);
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
|
@ -252,9 +248,8 @@ public class EventController {
|
||||||
for (EventDto list : lists) {
|
for (EventDto list : lists) {
|
||||||
list.setEventNewName("渣土车发现");
|
list.setEventNewName("渣土车发现");
|
||||||
}
|
}
|
||||||
Integer integer = eventMapper.selectCountByName("'渣土车发现'");
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("sum",integer);
|
map.put("sum",lists.size());
|
||||||
map.put("events",lists);
|
map.put("events",lists);
|
||||||
Result success = Result.success(map);
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
|
@ -263,9 +258,8 @@ public class EventController {
|
||||||
for (EventDto list : lists) {
|
for (EventDto list : lists) {
|
||||||
list.setEventNewName("安保区域人员滞留");
|
list.setEventNewName("安保区域人员滞留");
|
||||||
}
|
}
|
||||||
Integer integer = eventMapper.selectCountByName("'安保区域人员滞留'");
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("sum",integer);
|
map.put("sum",lists.size());
|
||||||
map.put("events",lists);
|
map.put("events",lists);
|
||||||
Result success = Result.success(map);
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
|
@ -274,9 +268,8 @@ public class EventController {
|
||||||
for (EventDto list : lists) {
|
for (EventDto list : lists) {
|
||||||
list.setEventNewName("安保区域人员徘徊");
|
list.setEventNewName("安保区域人员徘徊");
|
||||||
}
|
}
|
||||||
Integer integer = eventMapper.selectCountByName("'安保区域人员徘徊'");
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("sum",integer);
|
map.put("sum",lists.size());
|
||||||
map.put("events",lists);
|
map.put("events",lists);
|
||||||
Result success = Result.success(map);
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
|
@ -285,9 +278,8 @@ public class EventController {
|
||||||
for (EventDto list : lists) {
|
for (EventDto list : lists) {
|
||||||
list.setEventNewName("渣土车未密闭");
|
list.setEventNewName("渣土车未密闭");
|
||||||
}
|
}
|
||||||
Integer integer = eventMapper.selectCountByName("'渣土车未密闭'");
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("sum",integer);
|
map.put("sum",lists.size());
|
||||||
map.put("events",lists);
|
map.put("events",lists);
|
||||||
Result success = Result.success(map);
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
|
@ -296,9 +288,8 @@ public class EventController {
|
||||||
for (EventDto list : lists) {
|
for (EventDto list : lists) {
|
||||||
list.setEventNewName("道路积水事件");
|
list.setEventNewName("道路积水事件");
|
||||||
}
|
}
|
||||||
Integer integer = eventMapper.selectCountByName("'道路积水事件'");
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("sum",integer);
|
map.put("sum",lists.size());
|
||||||
map.put("events",lists);
|
map.put("events",lists);
|
||||||
Result success = Result.success(map);
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
|
|
|
@ -54,6 +54,6 @@ public class RoadData {
|
||||||
private String points;
|
private String points;
|
||||||
|
|
||||||
@JsonFormat(pattern="yyyy-MM-dd mm:HH:ss",timezone = "GMT+8")
|
@JsonFormat(pattern="yyyy-MM-dd mm:HH:ss",timezone = "GMT+8")
|
||||||
private LocalDateTime dt;
|
private String dt;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.hisense.monitormanage.dto.BuildingRecordsDto;
|
import com.hisense.monitormanage.dto.BuildingRecordsDto;
|
||||||
import com.hisense.monitormanage.dto.BuildingRecordsDtos;
|
import com.hisense.monitormanage.dto.BuildingRecordsDtos;
|
||||||
import com.hisense.monitormanage.entity.BuildingRecords;
|
import com.hisense.monitormanage.entity.BuildingRecords;
|
||||||
|
import com.hisense.monitormanage.entity.RoadData;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
@ -21,7 +22,7 @@ import java.util.Map;
|
||||||
@Repository
|
@Repository
|
||||||
public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
|
public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
|
||||||
|
|
||||||
public void batchSave(@Param("list") List<Map> list);
|
void batchSave(@Param("list") List<Map> list);
|
||||||
|
|
||||||
void batchUpdate(@Param("list") List<Map> list);
|
void batchUpdate(@Param("list") List<Map> list);
|
||||||
|
|
||||||
|
@ -37,13 +38,6 @@ public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
|
||||||
|
|
||||||
List<BuildingRecordsDto> selectNoiceEvent(@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
List<BuildingRecordsDto> selectNoiceEvent(@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
||||||
|
|
||||||
@Select("select COUNT(*) from (select br.pm10 from t_building_records br JOIN t_building_new_site bs ON br.project_name = bs.gdmc where br.pm10 > 80) a ")
|
|
||||||
Integer selectCountRaise();
|
|
||||||
|
|
||||||
@Select("SELECT COUNT(*) FROM (SELECT br.noice,br.push_time FROM t_building_records br JOIN t_building_new_site bs ON br.project_name = bs.gdmc WHERE (hour(br.push_time)>=22 or 6 > hour(br.push_time)) AND br.noice > 55 " +
|
|
||||||
"UNION SELECT br.noice,br.push_time FROM t_building_records br JOIN t_building_new_site bs ON br.project_name = bs.gdmc WHERE DATE_FORMAT(br.push_time,'%H')>=6 AND DATE_FORMAT(br.push_time,'%H')<=22 AND br.noice > 70) a")
|
|
||||||
Integer selectCountNoice();
|
|
||||||
|
|
||||||
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq,bs.yjsg from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq,bs.yjsg from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
||||||
" where br.project_name like concat('%',#{projectName},'%')")
|
" where br.project_name like concat('%',#{projectName},'%')")
|
||||||
List<BuildingRecordsDto> selectByProjectName(String projectName);
|
List<BuildingRecordsDto> selectByProjectName(String projectName);
|
||||||
|
@ -55,4 +49,12 @@ public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
|
||||||
@Param("jd1") Double jd1,
|
@Param("jd1") Double jd1,
|
||||||
@Param("wd") Double wd,
|
@Param("wd") Double wd,
|
||||||
@Param("wd1") Double wd1);
|
@Param("wd1") Double wd1);
|
||||||
|
@Select("select * from t_building_records br JOIN t_building_new_site bs ON br.project_name = bs.gdmc where TO_DAYS(push_time) = TO_DAYS(NOW()) AND br.pm10 > 80")
|
||||||
|
List<BuildingRecordsDto> selectByDayRaise();
|
||||||
|
|
||||||
|
@Select("SELECT a.* FROM (SELECT br.noice,br.push_time,br.project_name,bs.jd,bs.wd,bs.channel_name,bs.sgwz,bs.ssdq FROM t_building_records br JOIN t_building_new_site bs ON br.project_name = bs.gdmc WHERE (hour(br.push_time)>=22 or 6 > hour(br.push_time)) AND br.noice > 55 AND TO_DAYS(br.push_time) = TO_DAYS(NOW()) UNION SELECT br.noice,br.push_time,br.project_name,bs.jd,bs.wd,bs.channel_name,bs.sgwz,bs.ssdq FROM t_building_records br JOIN t_building_new_site bs ON br.project_name = bs.gdmc WHERE DATE_FORMAT(br.push_time,'%H')>=6 AND DATE_FORMAT(br.push_time,'%H') < 22 AND br.noice > 70 AND TO_DAYS(br.push_time) = TO_DAYS(NOW())) a")
|
||||||
|
List<BuildingRecordsDto> selectByDayNoice();
|
||||||
|
|
||||||
|
@Select("select * from t_road_data where pm10 > 150 AND dt = #{dt}")
|
||||||
|
List<RoadData> selectByDayRoadData(String dt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,6 @@ public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
|
||||||
|
|
||||||
List<CameraChannelNLDto> selectNLAll(@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
List<CameraChannelNLDto> selectNLAll(@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
||||||
|
|
||||||
@Select("SELECT * FROM t_camera_channel WHERE channel_code < '183_37028301831321232723' AND channel_code > '183_37028301831321231067' ORDER BY channel_code DESC" )
|
@Select("SELECT * FROM t_camera_channel WHERE channel_code < '183_37028301831321231117' AND channel_code > '183_37028301001328630804' ORDER BY channel_code DESC")
|
||||||
List<CameraChannel> selectCameraChannel();
|
List<CameraChannel> selectCameraChannel();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,9 +22,6 @@ public interface EventMapper extends BaseMapper<Event> {
|
||||||
|
|
||||||
List<EventDto> selectByName(@Param("eventNewName") String eventNewName,@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
List<EventDto> selectByName(@Param("eventNewName") String eventNewName,@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
||||||
|
|
||||||
@Select("select count(*) from t_event where track_event = 'START' and event_cn_name in (${eventNewName})")
|
|
||||||
Integer selectCountByName(@Param("eventNewName")String eventNewName);
|
|
||||||
|
|
||||||
@Select("SELECT * FROM t_event where TO_DAYS(capture_time) = TO_DAYS(NOW()) AND event_cn_name in (${eventNewName}) AND track_event = 'START'")
|
@Select("SELECT * FROM t_event where TO_DAYS(capture_time) = TO_DAYS(NOW()) AND event_cn_name in (${eventNewName}) AND track_event = 'START'")
|
||||||
List<EventDto> selectByTimeAndName(@Param("eventNewName") String eventNewName);
|
List<EventDto> selectByTimeAndName(@Param("eventNewName") String eventNewName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.hisense.monitormanage.mapper;
|
package com.hisense.monitormanage.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.hisense.monitormanage.entity.PassengerFlow;
|
||||||
import com.hisense.monitormanage.entity.RoadData;
|
import com.hisense.monitormanage.entity.RoadData;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
@ -25,4 +26,6 @@ public interface RoadDataMapper extends BaseMapper<RoadData> {
|
||||||
|
|
||||||
@Select("select count(*) from t_road_data where pm10 > 150")
|
@Select("select count(*) from t_road_data where pm10 > 150")
|
||||||
Integer selectCountRoadData();
|
Integer selectCountRoadData();
|
||||||
|
|
||||||
|
RoadData getByMaxId();
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,7 +307,7 @@ public class MonitorService {
|
||||||
/**
|
/**
|
||||||
* 所有摄像头抓图 sql持续更新
|
* 所有摄像头抓图 sql持续更新
|
||||||
*/
|
*/
|
||||||
//@Scheduled(cron = "0 0 6 * * ?")
|
@Scheduled(cron = "0 0 6 * * ?")
|
||||||
public void CameraScreenshot () {
|
public void CameraScreenshot () {
|
||||||
try {
|
try {
|
||||||
log.info("[monitor-capture]: start capture");
|
log.info("[monitor-capture]: start capture");
|
||||||
|
|
|
@ -22,4 +22,8 @@
|
||||||
limit #{page},#{pageSize}
|
limit #{page},#{pageSize}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getByMaxId" resultType="com.hisense.monitormanage.entity.RoadData">
|
||||||
|
select * from t_road_data ORDER BY id DESC limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue