| | |
| | | * @Description query illegal building and violation |
| | | * @Param [size, current, state, type, resource] |
| | | **/ |
| | | @ApiOperation(value = "查询违规违建") |
| | | /* @ApiOperation(value = "查询违规违建") |
| | | @GetMapping("/query") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "state", value = "处理状态(0-待处理1-误报2-上报3-再学习/再训练4暂不处理5立案6调度7处置8核查9结案)", dataType = "Integer"), |
| | |
| | | return CommonResult.success(queryList); |
| | | } |
| | | return CommonResult.failed("request parameter is null"); |
| | | }*/ |
| | | |
| | | @ApiOperation(value = "查询违规违建") |
| | | @GetMapping("/query") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "state", value = "处理状态(0-待处理1-误报2-上报3-再学习/再训练4暂不处理5立案6调度7处置8核查9结案)", dataType = "Integer"), |
| | | @ApiImplicitParam(name = "type", value = "1 违规,2 违建", dataType = "Integer"), |
| | | @ApiImplicitParam(name = "resource", value = "1 视频,2 手动", dataType = "Integer"), |
| | | @ApiImplicitParam(name = "code", dataType = "String"), |
| | | @ApiImplicitParam(name = "categoryBig", dataType = "String"), |
| | | @ApiImplicitParam(name = "categorySmall", dataType = "String"), |
| | | @ApiImplicitParam(name = "street", dataType = "Integer"), |
| | | @ApiImplicitParam(name = "site", dataType = "String"), |
| | | @ApiImplicitParam(name = "startTime", dataType = "String"), |
| | | @ApiImplicitParam(name = "endTime", dataType = "String") |
| | | |
| | | }) |
| | | public CommonResult searchViolation(@RequestParam Integer size, |
| | | @RequestParam Integer current, |
| | | @RequestParam Integer state, |
| | | @RequestParam(required = false) Integer type, |
| | | @RequestParam(required = false) Integer resource, |
| | | @RequestParam(required = false) String code, |
| | | @RequestParam(required = false) String categoryBig, |
| | | @RequestParam(required = false) String categorySmall, |
| | | @RequestParam(required = false) Integer street, |
| | | @RequestParam(required = false) String site, |
| | | @RequestParam(required = false) String startTime, |
| | | @RequestParam(required = false) String endTime ){ |
| | | if (state != null) { |
| | | Page<Object> queryList; |
| | | Integer violation = 1; |
| | | Integer illegalBuilding = 2; |
| | | if (type == violation) { |
| | | queryList = baseCaseService.listViolationsPage(new Page<>().setCurrent(current).setSize(size), state, resource, code, categoryBig, categorySmall, street, site, startTime, endTime); |
| | | } else if (type == illegalBuilding) { |
| | | queryList = baseCaseService.listIllegalBuilding(new Page<>().setCurrent(current).setSize(size), state, resource); |
| | | } else { |
| | | return CommonResult.failed("bad request url"); |
| | | } |
| | | return CommonResult.success(queryList); |
| | | } |
| | | return CommonResult.failed("request parameter is null"); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperation("导入") |
| | | @SneakyThrows |
| | | @LogSave(operationType = "队伍建设管理", contain = "导入") |
| | | public CommonResult export(MultipartFile multipartFile) { |
| | | public CommonResult export(@RequestParam("file") MultipartFile multipartFile) { |
| | | EasyExcel.read(multipartFile.getInputStream(), TeamConstruction.class, new ReadListener() { |
| | | @Override |
| | | public void invoke(Object o, AnalysisContext analysisContext) { |
| | |
| | | * @since 2022-09-24 |
| | | */ |
| | | public interface BaseCaseMapper extends BaseMapper<BaseCase> { |
| | | Page<CasePoolViolationVO> listViolationsPage(Page page, Integer state, Integer type, Integer resource); |
| | | Page<CasePoolViolationVO> listViolationsPage(Page page, Integer state, Integer type, Integer resource, String code, String categoryBig, String categorySmall, Integer street, String site, String startTime, String endTime); |
| | | |
| | | Page<CasePoolIllegalBuildingVO> listIllegalBuildingsPage(Page page, Integer state, Integer type, Integer resource); |
| | | |
| | |
| | | */ |
| | | String uploadEvent(Long caseId); |
| | | |
| | | Page listViolationsPage(Page page, Integer state, Integer resource); |
| | | Page listViolationsPage(Page page, Integer state, Integer resource, String code, String categoryBig, String categorySmall, Integer street, String site, String startTime, String endTime); |
| | | |
| | | Page listIllegalBuilding(Page page, Integer state, Integer resource); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Page listViolationsPage(Page page, Integer state, Integer resource) { |
| | | public Page listViolationsPage(Page page, Integer state, Integer resource, String code, String categoryBig, String categorySmall, Integer street, String site, String startTime, String endTime) { |
| | | Integer type = 01; |
| | | Integer hours = 60; |
| | | Integer day = 24; |
| | | Page<CasePoolViolationVO> violationsPage = baseCaseMapper.listViolationsPage(page, state, type, resource); |
| | | Page<CasePoolViolationVO> violationsPage = baseCaseMapper.listViolationsPage(page, state, type, resource, code, categoryBig, categorySmall, street, site, startTime, endTime); |
| | | violationsPage.getRecords().stream().forEach(item -> { |
| | | if (item.getCloseTime() == null) { |
| | | Duration duration = Duration.between(item.getAlarmTime(), LocalDateTime.now()); |
| | |
| | | <if test="type!=null"> |
| | | and ubc.category=#{type} |
| | | </if> |
| | | <if test="code!=null"> |
| | | and ubc.code=#{code} |
| | | </if> |
| | | <if test="categoryBig != null"> |
| | | and t3.name like concat('%', #{categoryBig},'%') |
| | | </if> |
| | | <if test="categorySmall != null"> |
| | | and t4.name like concat('%', #{categorySmall},'%') |
| | | </if> |
| | | <if test="street != null"> |
| | | and ubc.community_id = #{street} |
| | | </if> |
| | | <if test="site"> |
| | | and ubc.site like concat('%', #{site},'%') |
| | | </if> |
| | | <if test="startTime !='' and endTime !='' and startTime!=null and endTime !=null"> |
| | | and ubc.create_time between #{startTime} and #{endTime} |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | |
| | | base_case_id |
| | | , illegal_building_id, writ_type, writ_code, illegal_type, send_time, limit_time, send_content, rectify_time, rectify_situation, remark, writ_pic, original_pic, rectified_pic, othen_pic, create_user, create_time |
| | | </sql> |
| | | <update id="deleteValueByCaseId"> |
| | | update ums_writ set value = null where base_case_id = #{baseCaseId} |
| | | </update> |
| | | <!-- <update id="deleteValueByCaseId">--> |
| | | <!-- update ums_writ set value = null where base_case_id = #{baseCaseId}--> |
| | | <!-- </update>--> |
| | | <delete id="deleteValueByCaseId"> |
| | | delete from ums_writ where base_case_id = #{baseCaseId} |
| | | </delete> |
| | | <select id="selectWritPage" resultMap="VoMap"> |
| | | SELECT w.*, wt.`name` as writ_type_name,bc.`code` event_code,dd.`name` category_name,wt.code template_code |
| | | FROM ums_writ w |