| | |
| | | |
| | | Page<Object> queryList; |
| | | if (type == 1) { |
| | | queryList = baseCaseService.listViolationsPage(current,size, state, resource, code, categoryBig, categorySmall, street, site, startTime, endTime, violationsTypeId); |
| | | queryList = baseCaseService.listViolationsPage(current, size, state, resource, code, categoryBig, categorySmall, street, site, startTime, endTime, violationsTypeId); |
| | | } else if (type == 2) { |
| | | queryList = baseCaseService.listIllegalBuilding(current,size, state, resource); |
| | | queryList = baseCaseService.listIllegalBuilding(current, size, state, resource); |
| | | } else { |
| | | return CommonResult.failed("bad request url"); |
| | | } |
| | |
| | | |
| | | @GetMapping("/video_inspection") |
| | | @ApiOperation("预警研判") |
| | | public CommonResult searchVideoInspection(@RequestParam Integer current) { |
| | | return CommonResult.success(baseCaseService.selectVideoInspection(current)); |
| | | public CommonResult searchVideoInspection(@RequestParam Integer current, |
| | | @RequestParam(required = false) Long gradeId, |
| | | @RequestParam(required = false) Long videoId, |
| | | @RequestParam(required = false) String beginTime, |
| | | @RequestParam(required = false) String endTime) { |
| | | return CommonResult.success(baseCaseService.selectVideoInspection(current, gradeId, videoId, beginTime, endTime)); |
| | | } |
| | | |
| | | @GetMapping("/video_inspection/Count") |
| | |
| | | public CommonResult<List<AIIotStatisticsVO>> statistics(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | |
| | | List<AIIotStatisticsVO> list = iEfficiencyService.aiMonthList(); |
| | | List<AIIotStatisticsVO> list = iEfficiencyService.aiMonthList(params.getBeginTime(), params.getEndTime()); |
| | | return CommonResult.success(list); |
| | | } |
| | | |
| | |
| | | @GetMapping(value = "/img", produces = {MediaType.IMAGE_JPEG_VALUE, MediaType.IMAGE_PNG_VALUE}) |
| | | // @GetMapping(value = "/img") |
| | | @ResponseBody |
| | | public byte[] getImages(HttpServletResponse response, @RequestParam String fileUrl, @RequestParam String OSSAccessKeyId, @RequestParam String Signature) { |
| | | public byte[] getImages(HttpServletResponse response, @RequestParam String fileUrl, |
| | | @RequestParam(required = false) String OSSAccessKeyId, |
| | | @RequestParam(required = false) String Signature) { |
| | | try { |
| | | URL url = new URL(fileUrl + "&OSSAccessKeyId=" + OSSAccessKeyId +"&Signature=" + Signature); |
| | | URL url = new URL(fileUrl); |
| | | HttpURLConnection conn = (HttpURLConnection) url.openConnection(); |
| | | conn.setRequestMethod("GET"); |
| | | conn.setConnectTimeout(10 * 1000); |
| | |
| | | return data; |
| | | |
| | | } catch (Exception e) { |
| | | System.out.println("获取图片失败:" + e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | |
| | | import com.ycl.dto.allot.EfficiencyDto; |
| | | import com.ycl.vo.cockpit.aiIot.AIIotStatisticsVO; |
| | | import com.ycl.vo.cockpit.aiIot.AIIotVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface EfficiencyMapper extends BaseMapper { |
| | | List<EfficiencyDto> list(); |
| | | |
| | | List<AIIotStatisticsVO> aiMonthList(); |
| | | List<AIIotStatisticsVO> aiMonthList(@Param("beginTime") String beginTime, @Param("endTime") String endTime); |
| | | |
| | | Long getSmokeCustomer(); |
| | | } |
| | |
| | | |
| | | List<QueryForViolationVO> selectViolationPage(@Param(value = "queryForViolationParam") QueryForViolationParam queryForViolationParam); |
| | | |
| | | Page<BaseCaseVO> selectVideoInspection(Page<Object> objectPage); |
| | | Page<BaseCaseVO> selectVideoInspection(Page<Object> objectPage, @Param("gradeId") Long gradeId, @Param("videoId") Long videoId, @Param("beginTime") String beginTime, @Param("endTime") String endTime); |
| | | |
| | | Integer dayCount(); |
| | | |
| | |
| | | |
| | | List<EfficiencyDto> list(); |
| | | |
| | | List<AIIotStatisticsVO> aiMonthList(); |
| | | List<AIIotStatisticsVO> aiMonthList(String beginTime, String endTime); |
| | | |
| | | Long getSmokeCustomer(); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<AIIotStatisticsVO> aiMonthList() { |
| | | return efficiencyMapper.aiMonthList(); |
| | | public List<AIIotStatisticsVO> aiMonthList(String beginTime, String endTime) { |
| | | return efficiencyMapper.aiMonthList(beginTime, endTime); |
| | | } |
| | | |
| | | @Override |
| | |
| | | */ |
| | | String uploadEvent(Long caseId); |
| | | |
| | | Page listViolationsPage(Integer size,Integer current, Integer state, Integer resource, String code, String categoryBig, String categorySmall, Integer street, String site, String startTime, String endTime, Integer violationsTypeId); |
| | | Page listViolationsPage(Integer size, Integer current, Integer state, Integer resource, String code, String categoryBig, String categorySmall, Integer street, String site, String startTime, String endTime, Integer violationsTypeId); |
| | | |
| | | Page listIllegalBuilding(Integer size,Integer current, Integer state, Integer resource); |
| | | Page listIllegalBuilding(Integer size, Integer current, Integer state, Integer resource); |
| | | |
| | | Boolean saveViolationCase(ViolationParam violationParam, Long id); |
| | | |
| | |
| | | |
| | | List<QueryForViolationVO> selectViolationList(QueryForViolationParam queryForViolationParam); |
| | | |
| | | Page<BaseCaseVO> selectVideoInspection(Integer current); |
| | | Page<BaseCaseVO> selectVideoInspection(Integer current, Long gradeId, Long videoId, String beginTime, String endTime); |
| | | |
| | | Map<String, Object> selectCount(); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Page listViolationsPage(Integer size, Integer current, Integer state, Integer resource, String code, String categoryBig, String categorySmall, Integer street, String site, String startTime, String endTime, Integer violationsTypeId) { |
| | | public Page listViolationsPage(Integer current, Integer size, Integer state, Integer resource, String code, String categoryBig, String categorySmall, Integer street, String site, String startTime, String endTime, Integer violationsTypeId) { |
| | | Integer type = 01; |
| | | Integer hours = 60; |
| | | Integer day = 24; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Page<BaseCaseVO> selectVideoInspection(Integer current) { |
| | | return baseCaseMapper.selectVideoInspection(new Page<>(current, 1)); |
| | | public Page<BaseCaseVO> selectVideoInspection(Integer current, Long gradeId, Long videoId, String beginTime, String endTime) { |
| | | return baseCaseMapper.selectVideoInspection(new Page<>(current, 1), gradeId, videoId, beginTime, endTime); |
| | | } |
| | | |
| | | @Override |
| | |
| | | WHERE |
| | | ubc.category = 1 |
| | | AND t4.`name` IS NOT NULL |
| | | <if test="beginTime!=null"> |
| | | and ubc.alarm_time BETWEEN #{beginTime} and #{endTime} |
| | | </if> |
| | | GROUP BY |
| | | t4.id,DATE_FORMAT(alarm_time,'%Y-%m') |
| | | ORDER BY DATE_FORMAT(alarm_time,'%Y-%m') desc ,COUNT(1) desc |
| | | </select> |
| | | <select id="getSmokeCustomer" resultType="java.lang.Long"> |
| | | select count(1) total from ums_ods_customer |
| | |
| | | </select> |
| | | |
| | | <select id="selectVideoInspection" resultType="com.ycl.vo.casePool.BaseCaseVO"> |
| | | SELECT t1.id as baseId, |
| | | t1.`code`, |
| | | t3.`name`, |
| | | t3.url_address, |
| | | t3.longitude, |
| | | t3.latitude, |
| | | t4.pic_data, |
| | | t5.`name` as grade, |
| | | t3.address, |
| | | t3.plat_resource_id as platResourceId, |
| | | t3.code as videoCode, |
| | | t1.alarm_time as alarmTime, |
| | | t1.alarm_time as currentAlarmTime, |
| | | t4.algo_name as algoName |
| | | SELECT t1.id as baseId, |
| | | t1.`code`, |
| | | t3.`name`, |
| | | t3.url_address, |
| | | t3.longitude, |
| | | t3.latitude, |
| | | t4.pic_data, |
| | | t5.`name` as grade, |
| | | t3.address, |
| | | t3.plat_resource_id as platResourceId, |
| | | t3.code as videoCode, |
| | | t1.alarm_time as alarmTime, |
| | | t1.alarm_time as currentAlarmTime, |
| | | t4.algo_name as algoName |
| | | FROM ums_base_case t1 |
| | | LEFT JOIN ums_violations t2 ON t1.id = t2.id |
| | | LEFT JOIN ums_video_point t3 on t2.video_point_id = t3.id |
| | | LEFT JOIN ums_video_alarm_report t4 on t4.id = t2.video_alarm_report_id |
| | | LEFT JOIN ums_data_dictionary t5 on t5.id = t2.grade_id |
| | | LEFT JOIN ums_violations t2 ON t1.id = t2.id |
| | | LEFT JOIN ums_video_point t3 on t2.video_point_id = t3.id |
| | | LEFT JOIN ums_video_alarm_report t4 on t4.id = t2.video_alarm_report_id |
| | | LEFT JOIN ums_data_dictionary t5 on t5.id = t2.grade_id |
| | | WHERE t1.state = 1 |
| | | <if test="gradeId!=null"> |
| | | and t2.grade_id = #{gradeId} |
| | | </if> |
| | | <if test="videoId!=null"> |
| | | and t2.video_point_id = #{videoId} |
| | | </if> |
| | | <if test="beginTime!=null and beginTime!=''"> |
| | | and t1.alarm_time between #{beginTime} and #{endTime} |
| | | </if> |
| | | group by t1.id |
| | | order by t1.id desc |
| | | </select> |
| | | |
| | | <select id="selectRegisterCount" resultType="java.lang.Long"> |
| | |
| | | t1.alarm_time, |
| | | t1.longitude, |
| | | t1.latitude, |
| | | -- ( CASE WHEN t1.category = 1 THEN "违规" WHEN t1.category = 2 THEN "违建" ELSE "其他" END ) AS type, |
| | | -- ( CASE WHEN t1.event_source = 1 THEN "视频巡查" WHEN t1.event_source = 2 THEN "网格巡查" ELSE "其他" END ) AS alarmAdvice, |
| | | -- ( CASE WHEN t1.category = 1 THEN "违规" WHEN t1.category = 2 THEN "违建" ELSE "其他" END ) AS type, |
| | | -- ( CASE WHEN t1.event_source = 1 THEN "视频巡查" WHEN t1.event_source = 2 THEN "网格巡查" ELSE "其他" END ) AS |
| | | alarmAdvice, |
| | | dd.name AS type, |
| | | ( CASE WHEN t1.event_source = 1 THEN "视频巡查" WHEN t1.event_source = 2 THEN "网格巡查" ELSE "其他" END ) AS source, |
| | | t1.site AS address, |