| | |
| | | String sheetName = "违规数据"; |
| | | EasyExcelUtils.export(response, sheetName, QueryForViolationVO.class, baseCaseService.selectViolation(queryForViolationParam).getRecords()); |
| | | } |
| | | |
| | | @GetMapping("/video_inspection") |
| | | @ApiOperation("预警研判") |
| | | public CommonResult searchVideoInspection(@RequestParam Integer current){ |
| | | return CommonResult.success(baseCaseService.selectVideoInspection(current)); |
| | | } |
| | | |
| | | @GetMapping("/video_inspection/Count") |
| | | @ApiOperation("预警研判左上角待审核案件,今日审核,今日在学习") |
| | | public CommonResult searchCount(){ |
| | | return CommonResult.success(baseCaseService.selectCount()); |
| | | } |
| | | |
| | | @PutMapping("/video_inspection") |
| | | @ApiOperation("预警研判确定") |
| | | public CommonResult searchCount(ViolationParam violationParam){ |
| | | return CommonResult.success(baseCaseService.updateCase(violationParam)); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/delete/{id}") |
| | | @ApiOperation("修改") |
| | | @ApiOperation("删除") |
| | | @LogSave(operationType = "卡口管理", contain = "删除卡口") |
| | | public CommonResult delete(@PathVariable Integer id) { |
| | | return CommonResult.success(iEquipmentBayonetService.removeById(id)); |
| | | } |
| | | |
| | | @GetMapping("/export") |
| | | |
| | | @PostMapping("/export") |
| | | @ApiOperation("导出") |
| | | @SneakyThrows |
| | | @LogSave(operationType = "卡口管理", contain = "导出卡口") |
| | |
| | | return CommonResult.success(enforcelawReportService.updateById(enforcelawReport)); |
| | | } |
| | | |
| | | @GetMapping("/download") |
| | | @PostMapping("/download") |
| | | @ApiOperation("导出") |
| | | @SneakyThrows |
| | | public void downloadExcel(@RequestParam(required = false) String startTime, |
| | |
| | | return CommonResult.success(iVideowarmEventsreportService.updateById(videoWarnEventsReport)); |
| | | } |
| | | |
| | | @GetMapping("/download") |
| | | @PostMapping("/download") |
| | | @ApiOperation("导出") |
| | | @SneakyThrows |
| | | public void downloadExcel(@RequestParam(required = false) String startTime, |
| | |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ApiModel(value = "添加违规案件") |
| | | public class ViolationParam { |
| | | |
| | | private Long baseId; |
| | | |
| | | /** |
| | | * 大类 |
| | | */ |
| | |
| | | import com.ycl.bo.casePool.CasePoolViolationDO; |
| | | import com.ycl.dto.caseHandler.QueryForViolationParam; |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | import com.ycl.vo.casePool.BaseCaseVO; |
| | | import com.ycl.vo.casePool.CasePoolIllegalBuildingVO; |
| | | import com.ycl.vo.casePool.CasePoolViolationVO; |
| | | import com.ycl.vo.casePool.QueryForViolationVO; |
| | |
| | | List<BaseCase> selectBaseCasePage(Page<BaseCase> page, @Param("code") String number,@Param("communityId") Integer communityId, @Param("categories") Integer categories, @Param("startTime") String startTime,@Param("endTime") String endTime,@Param("site") String site); |
| | | |
| | | Page<QueryForViolationVO> selectViolationPage(Page<QueryForViolationVO> setCurrent, QueryForViolationParam queryForViolationParam); |
| | | |
| | | Page<BaseCaseVO> selectVideoInspection(Page<Object> objectPage); |
| | | } |
| | |
| | | import com.ycl.dto.casePool.ViolationParam; |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | import com.ycl.entity.caseHandler.BaseCaseDetail; |
| | | import com.ycl.vo.casePool.BaseCaseVO; |
| | | import com.ycl.vo.casePool.QueryForViolationVO; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | List<BaseCase> selectPage(Page<BaseCase> setSize, String number, Integer communityId, Integer categories, String startTime, String endTime, String site); |
| | | |
| | | Page<QueryForViolationVO> selectViolation(QueryForViolationParam queryForViolationParam); |
| | | |
| | | Page<BaseCaseVO> selectVideoInspection(Integer current); |
| | | |
| | | Map<String,Object> selectCount(); |
| | | |
| | | Boolean updateCase(ViolationParam violationParam); |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.Duration; |
| | |
| | | .setSize(queryForViolationParam.getPageSize()) |
| | | .setCurrent(queryForViolationParam.getCurrent()), queryForViolationParam); |
| | | } |
| | | |
| | | @Override |
| | | public Page<BaseCaseVO> selectVideoInspection(Integer current) { |
| | | return baseCaseMapper.selectVideoInspection(new Page<>(current, 1)); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> selectCount() { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Long review = baseCaseMapper.selectCount(new LambdaQueryWrapper<BaseCase>().eq(BaseCase::getState, 1)); |
| | | map.put("review", review); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean updateCase(ViolationParam violationParam) { |
| | | BaseCase baseCase = new BaseCase(); |
| | | BeanUtils.copyProperties(violationParam, baseCase); |
| | | baseCase.setId(violationParam.getBaseId()); |
| | | baseCaseMapper.updateById(baseCase); |
| | | Violations violations = new Violations(); |
| | | BeanUtils.copyProperties(violationParam, violations); |
| | | violations.setId(violations.getId()); |
| | | return violationsMapper.updateById(violations) == 1 ? true : false; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.vo.casePool; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class BaseCaseVO { |
| | | private String code; |
| | | private String name; |
| | | private String urlAddress; |
| | | private String longitude; |
| | | private String latitude; |
| | | private String picData; |
| | | private String grade; |
| | | private String street; |
| | | private String community; |
| | | } |
| | |
| | | @ExcelProperty(index = 6, value = "出入城类型") |
| | | private String inOutCityTypeName; |
| | | |
| | | @ExcelIgnore |
| | | private String belongArea; |
| | | } |
| | |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | <select id="selectVideoInspection" resultType="com.ycl.vo.casePool.BaseCaseVO"> |
| | | SELECT |
| | | t1.`code`, |
| | | t3.`name`, |
| | | t3.url_address, |
| | | t3.longitude, |
| | | t3.latitude, |
| | | t4.pic_data, |
| | | t5.`name` as grade, |
| | | t6.`name` as street, |
| | | t7.`name` as community |
| | | 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_data_dictionary t6 on t6.id=t1.street_id |
| | | LEFT JOIN ums_data_dictionary t7 on t7.id=t1.community_id |
| | | WHERE t1.state=1 |
| | | group by t1.id |
| | | </select> |
| | | </mapper> |