添加工地场景噪声事件
This commit is contained in:
parent
34ad04c82e
commit
1ae322e435
|
@ -113,6 +113,18 @@ public class BuildingController {
|
|||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工地噪声事件
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("selectNoiceEvent")
|
||||
@ApiOperation("查询工地噪声事件")
|
||||
public Result selectNoiceEvent(Integer page,Integer pageSize){
|
||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectNoiceEvent(page,pageSize);
|
||||
Result success = Result.success(recordsDtos);
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据工地名称搜索工地
|
||||
* @param projectName
|
||||
|
|
|
@ -36,6 +36,8 @@ public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
|
|||
|
||||
List<BuildingRecordsDto> selectRaise(@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
||||
|
||||
List<BuildingRecordsDto> selectNoiceEvent(@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
||||
|
||||
@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},'%')")
|
||||
List<BuildingRecordsDto> selectByProjectName(String projectName);
|
||||
|
|
|
@ -101,6 +101,7 @@ public class EventService {
|
|||
|
||||
public void screenshot(){
|
||||
String url = "http://218.58.65.132:2580/api/haixin";
|
||||
String image = "http://120.221.72.8:7002";
|
||||
QueryWrapper<Event> queryWrapper = new QueryWrapper<>();
|
||||
List<Event> events = eventMapper.selectList(queryWrapper);
|
||||
events.forEach(event -> {
|
||||
|
@ -111,7 +112,8 @@ public class EventService {
|
|||
map.put("cjname",event.getEventCnName());
|
||||
map.put("datetime",event.getCaptureTime());
|
||||
map.put("vidorpic",0);
|
||||
map.put("resultpicurl1",event.getImageUrl());
|
||||
String substring = event.getImageUrl().substring(26);
|
||||
map.put("resultpicurl1",image + substring);
|
||||
map.put("piclongitude",event.getLongitude());
|
||||
map.put("piclatitude",event.getLatitude());
|
||||
map.put("sign", SecureUtil.md5(sign));
|
||||
|
|
|
@ -68,7 +68,7 @@ public class RoadDataService {
|
|||
}
|
||||
|
||||
//道路统计数据与排名(道路污染),调用公开接口并保存到表t_road_data
|
||||
@Scheduled(cron="0 0 8 * * ?")
|
||||
@Scheduled(cron="0 0 7 * * ?")
|
||||
public void saveRoadData(){
|
||||
String url = "http://outerdata.novaecs.com/api/qingdaoData/roadData?groupId={groupId}&timeType={timeType}&dt={dt}";
|
||||
|
||||
|
|
|
@ -37,4 +37,17 @@
|
|||
limit #{page},#{pageSize}
|
||||
</select>
|
||||
|
||||
<select id="selectNoiceEvent" resultType="com.hisense.monitormanage.dto.BuildingRecordsDto">
|
||||
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
|
||||
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) a
|
||||
<bind name="page" value="(page-1)*pageSize"/>
|
||||
limit #{page},#{pageSize}
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue