New file |
| | |
| | | package com.ycl.bo.casePool; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("案件池违建立案件") |
| | | public class CasePoolIllegalBuildingDO { |
| | | |
| | | /** |
| | | * 事件编号 |
| | | */ |
| | | @ApiModelProperty(value = "事件编号", dataType = "String") |
| | | private String code; |
| | | |
| | | /** |
| | | * 事件来源(1-视频 2-手动登记) |
| | | */ |
| | | @ApiModelProperty(value = "事件来源(1-视频 2-手动登记)", dataType = "Integer") |
| | | private Integer eventSource; |
| | | |
| | | /** |
| | | * 违建类别 |
| | | */ |
| | | @ApiModelProperty(value = "违建类别", dataType = "Integer") |
| | | private Integer categoryId; |
| | | |
| | | /** |
| | | * 所属社区 |
| | | */ |
| | | @TableField("community_id") |
| | | @ApiModelProperty(value = "违建类别", dataType = "Integer") |
| | | private Integer communityId; |
| | | |
| | | /** |
| | | * 违建具体位置 |
| | | */ |
| | | @ApiModelProperty(value = "违建具体位置", dataType = "String") |
| | | private String site; |
| | | |
| | | /** |
| | | * 违建长 |
| | | */ |
| | | @ApiModelProperty(value = "违建长", dataType = "Integer") |
| | | private Float buildingLength; |
| | | |
| | | /** |
| | | * 违建宽 |
| | | */ |
| | | @ApiModelProperty(value = "违建宽", dataType = "Integer") |
| | | private Float buildingWidth; |
| | | |
| | | /** |
| | | * 违建高 |
| | | */ |
| | | @ApiModelProperty(value = "违建高", dataType = "Float") |
| | | private Float buildingHigh; |
| | | |
| | | /** |
| | | * 违建面积 |
| | | */ |
| | | @ApiModelProperty(value = "违建面积", dataType = "Float") |
| | | private Float buildingArea; |
| | | |
| | | /** |
| | | * 违建材料 |
| | | */ |
| | | @ApiModelProperty(value = "违建材料", dataType = "String") |
| | | private String materials; |
| | | } |
New file |
| | |
| | | package com.ycl.bo.casePool; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ApiModel("案件池违规案件") |
| | | public class CasePoolViolationDO { |
| | | |
| | | /** |
| | | * 事件编号 |
| | | */ |
| | | @ApiModelProperty(value = "事件编号", dataType = "String") |
| | | private String code; |
| | | |
| | | /** |
| | | * 事件来源(1-视频 2-手动登记) |
| | | */ |
| | | @ApiModelProperty(value = "事件来源(1-视频 2-手动登记)", dataType = "Integer") |
| | | private Integer eventSource; |
| | | |
| | | |
| | | /** |
| | | * 报警点位 事发地点 |
| | | */ |
| | | @ApiModelProperty(value = "报警点位", dataType = "String") |
| | | private String site; |
| | | |
| | | /** |
| | | * 所属街道 |
| | | */ |
| | | @ApiModelProperty(value = "所属街道", dataType = "Integer") |
| | | private Integer streetId; |
| | | |
| | | /** |
| | | * 报警时间 |
| | | */ |
| | | @ApiModelProperty(value = "报警时间", dataType = "LocalDateTime") |
| | | private LocalDateTime alarmTime; |
| | | |
| | | |
| | | /** |
| | | * 大类 |
| | | */ |
| | | @ApiModelProperty(value = "事件编号", dataType = "String") |
| | | private Integer categoryId; |
| | | |
| | | /** |
| | | * 小类 |
| | | */ |
| | | @ApiModelProperty(value = "小类", dataType = "String") |
| | | private Integer typeId; |
| | | |
| | | |
| | | /** |
| | | * 案由 |
| | | */ |
| | | @ApiModelProperty(value = "案由", dataType = "String") |
| | | private String actionCause; |
| | | |
| | | /** |
| | | * 结案时间 |
| | | */ |
| | | @ApiModelProperty(value = "结案时间", dataType = "DateTime") |
| | | private LocalDateTime closeTime; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.dto.casePool.IllegalBuildingParam; |
| | | import com.ycl.dto.casePool.ViolationParam; |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | import com.ycl.service.caseHandler.IBaseCaseService; |
| | | import com.ycl.vo.ViolationSettingVO; |
| | | import com.ycl.service.caseHandler.IIllegalBuildingService; |
| | | import com.ycl.service.caseHandler.IViolationsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/base-case") |
| | | @Api(tags = "案件池") |
| | | public class BaseCaseController extends BaseController { |
| | | |
| | | private IBaseCaseService baseCaseService; |
| | | |
| | | @Autowired |
| | | IViolationsService violationsService; |
| | | |
| | | @Autowired |
| | | IIllegalBuildingService illegalBuildingService; |
| | | |
| | | @Autowired |
| | | public void setBaseCaseService(IBaseCaseService baseCaseService) { |
| | |
| | | |
| | | @ApiOperation(value = "上传市平台") |
| | | @PostMapping("/upload-event") |
| | | public CommonResult uploadEvent(@RequestParam Integer caseId) { |
| | | public CommonResult uploadEvent(@RequestParam Integer caseId, CommonResult<Object> success) { |
| | | String msg = baseCaseService.uploadEvent(caseId); |
| | | if (StringUtils.isEmpty(msg)) { |
| | | return CommonResult.success(null); |
| | | return success; |
| | | } else { |
| | | return CommonResult.failed(msg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description query illegal building and violation |
| | | * @Param [size, current, state, type, resource] |
| | | **/ |
| | | @ApiOperation(value = "查询违规违建") |
| | | @GetMapping("/query/{type}") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "state", value = "处理状态(0误报 1上报 2立案 3派遣 4处置 5核查 6结案7处理中)", dataType = "Integer"), |
| | | @ApiImplicitParam(name = "type", value = "01 违规,02 违建", dataType = "Integer") |
| | | }) |
| | | public CommonResult searchViolation(@RequestParam Integer size, |
| | | @RequestParam Integer current, |
| | | @RequestParam Integer state, |
| | | @PathVariable(value = "type") Integer type, |
| | | @RequestParam Integer resource) { |
| | | if (state != null) { |
| | | Page<Object> page = new Page<>(); |
| | | page.setCurrent(current); |
| | | page.setSize(size); |
| | | Page<Object> queryList; |
| | | Integer violation = 01; |
| | | Integer illegalBuilding = 02; |
| | | if (type == violation) { |
| | | queryList = baseCaseService.listViolationsPage(page, state, resource); |
| | | } else if (type == illegalBuilding) { |
| | | queryList = baseCaseService.listIllegalBuilding(page, state, resource); |
| | | } else { |
| | | return CommonResult.failed("bad request url"); |
| | | } |
| | | return CommonResult.success(queryList); |
| | | } |
| | | return CommonResult.failed("request parameter is null"); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description delete illegal building or violation |
| | | * @Param [id, type] |
| | | **/ |
| | | @ApiOperation(value = "删除违规/违建案件") |
| | | @DeleteMapping("/deletion") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "01 违规,02 违建", dataType = "Integer") |
| | | }) |
| | | public CommonResult removeCase(@RequestParam Integer id, @RequestParam Integer type) { |
| | | Integer violationType = 01; |
| | | Integer illegalBuildingType = 02; |
| | | if (id != null) { |
| | | if (type == violationType) { |
| | | return CommonResult.success(violationsService.removeById(id)); |
| | | } else if (type == illegalBuildingType) { |
| | | return CommonResult.success(illegalBuildingService.removeById(id)); |
| | | } |
| | | return CommonResult.success(baseCaseService.removeById(id)); |
| | | } |
| | | return CommonResult.failed("request parameter is null"); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description delete illegal buildings or violations |
| | | * @Param [ids, type] |
| | | **/ |
| | | @ApiOperation(value = "删除违规/违建案件") |
| | | @DeleteMapping("/batch_deletion") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "01 违规,02 违建", dataType = "Integer") |
| | | }) |
| | | public CommonResult removeCases(@RequestParam String[] ids, @RequestParam Integer type) { |
| | | Integer violationType = 01; |
| | | Integer illegalBuildingType = 02; |
| | | List<String> idList = Arrays.asList(ids); |
| | | if (!idList.isEmpty()) { |
| | | if (type == violationType) { |
| | | return CommonResult.success(violationsService.removeBatchByIds(idList)); |
| | | } else if (type == illegalBuildingType) { |
| | | return CommonResult.success(illegalBuildingService.removeBatchByIds(idList)); |
| | | } |
| | | return CommonResult.success(baseCaseService.removeBatchByIds(idList)); |
| | | } |
| | | return CommonResult.failed("request parameter is null"); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description add violation |
| | | * @Param [violationParam] |
| | | **/ |
| | | @ApiOperation(value = "添加违规案件") |
| | | @PostMapping("/addition_violation") |
| | | public CommonResult addViolationCase(@RequestBody @Validated ViolationParam violationParam) { |
| | | BaseCase baseCase = new BaseCase(); |
| | | BeanUtils.copyProperties(violationParam, baseCase); |
| | | baseCaseService.save(baseCase); |
| | | return CommonResult.success(baseCaseService.saveViolationCase(violationParam, baseCase.getId())); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description add illegal building |
| | | * @Param [violationParam] |
| | | **/ |
| | | @ApiOperation(value = "添加违建案件") |
| | | @PostMapping("/addition_violation") |
| | | public CommonResult addIllegalBuildingCase(@RequestBody @Validated IllegalBuildingParam illegalBuildingParam) { |
| | | BaseCase baseCase = new BaseCase(); |
| | | BeanUtils.copyProperties(illegalBuildingParam, baseCase); |
| | | baseCaseService.save(baseCase); |
| | | return CommonResult.success(baseCaseService.saveIllegalBuildingCase(illegalBuildingParam, baseCase.getId())); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.api.CommonResult; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | |
| | | |
| | | /** |
| | |
| | | return CommonResult.success(iDataDictionaryService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * @Description batch delete illegal building |
| | | * @Param [ids] |
| | | * @return com.ycl.api.CommonResult |
| | | **/ |
| | | @ApiOperation(value = "批量删除违规类型") |
| | | @DeleteMapping("/batch_delete") |
| | | public CommonResult removeIllegalBuildings(@RequestParam String[] ids){ |
| | | return CommonResult.success(iDataDictionaryService.removeBatchByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * @Description search illegal building type first |
| | | * @Param [] |
| | | * @return com.ycl.api.CommonResult |
| | | **/ |
| | | @ApiOperation(value = "查询所属类型") |
| | | @GetMapping("/query/type_first") |
| | | public CommonResult searchIllegalBuildingTypeFirst(){ |
| | | String typeLevel="1"; |
| | | String typeCode="06"; |
| | | return CommonResult.success(iDataDictionaryService |
| | | .list(new LambdaQueryWrapper<DataDictionary>() |
| | | .eq(DataDictionary::getLevel,typeLevel) |
| | | .eq(DataDictionary::getTypeCode,typeCode))); |
| | | } |
| | | |
| | | /** |
| | | * @Description search illegal building type second |
| | | * @Param [] |
| | | * @return com.ycl.api.CommonResult |
| | | **/ |
| | | @ApiOperation(value = "查询所属类别") |
| | | @GetMapping("/query/type_second") |
| | | public CommonResult searchIllegalBuildingTypeSecond(){ |
| | | String typeLevel="2"; |
| | | String typeCode="06"; |
| | | return CommonResult.success(iDataDictionaryService |
| | | .list(new LambdaQueryWrapper<DataDictionary>() |
| | | .eq(DataDictionary::getLevel,typeLevel) |
| | | .eq(DataDictionary::getTypeCode,typeCode))); |
| | | } |
| | | |
| | | /** |
| | | * @Description modify illegal building type |
| | | * @Param [typeFirst, id] |
| | | * @return com.ycl.api.CommonResult |
| | | **/ |
| | | @ApiOperation(value = "修改所属类型/类别") |
| | | @PutMapping("/modification/type") |
| | | public CommonResult modifyIllegalBuildingType(@RequestParam String type,@RequestParam Integer id){ |
| | | return CommonResult.success(iDataDictionaryService |
| | | .update(new LambdaUpdateWrapper<DataDictionary>() |
| | | .eq(DataDictionary::getId,id) |
| | | .set(StringUtils.isNotBlank(type),DataDictionary::getName,type))); |
| | | } |
| | | |
| | | /** |
| | | * @Description addition illegal building type |
| | | * @Param [dataDictionary] |
| | | * @return com.ycl.api.CommonResult |
| | | **/ |
| | | @ApiOperation(value = "添加所属类型/类别") |
| | | @PostMapping("/addition/type") |
| | | public CommonResult addIllegalBuildingTypeFirst(@RequestBody @Validated DataDictionary dataDictionary){ |
| | | return CommonResult.success(iDataDictionaryService.save(dataDictionary)); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.ycl.controller.caseHandler; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | |
| | | |
| | | /** |
| | |
| | | IDataDictionaryService iDataDictionaryService; |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description 查询违建类型 |
| | | * @Param [size, current, keyWord] |
| | | * @return com.ycl.api.CommonResult |
| | | **/ |
| | | @ApiOperation(value = "查询违规类型") |
| | | @GetMapping("/query") |
| | | public CommonResult searchIllegalBuilding(@RequestParam Integer size, |
| | | @RequestParam Integer current, |
| | | @RequestParam(required = false) String keyWord) { |
| | | public CommonResult searchViolations(@RequestParam Integer size, |
| | | @RequestParam Integer current, |
| | | @RequestParam(required = false) String keyWord) { |
| | | Page<ViolationSettingVO> dataDictionaryPage = new Page<>(); |
| | | dataDictionaryPage.setSize(size); |
| | | dataDictionaryPage.setCurrent(current); |
| | | return CommonResult.success(iDataDictionaryService.listViolations(dataDictionaryPage,keyWord)); |
| | | return CommonResult.success(iDataDictionaryService.listViolations(dataDictionaryPage, keyWord)); |
| | | } |
| | | |
| | | /** |
| | | * @Description delete illegal building by id |
| | | * @Param [id] |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description delete illegal building by id |
| | | * @Param [id] |
| | | **/ |
| | | @ApiOperation(value = "删除违规类型") |
| | | @DeleteMapping("/delete") |
| | | public CommonResult removeIllegalBuilding(@RequestParam Integer id){ |
| | | public CommonResult removeViolation(@RequestParam Integer id) { |
| | | return CommonResult.success(iDataDictionaryService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description batch delete violations |
| | | * @Param [ids] |
| | | **/ |
| | | @ApiOperation(value = "批量删除违规类型") |
| | | @DeleteMapping("/batch_delete") |
| | | public CommonResult removeViolations(@RequestParam String[] ids) { |
| | | return CommonResult.success(iDataDictionaryService.removeBatchByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description search violation type first |
| | | * @Param [] |
| | | **/ |
| | | @ApiOperation(value = "查询所属类型") |
| | | @GetMapping("/query/type_first") |
| | | public CommonResult searchViolationsTypeFirst() { |
| | | String typeLevel = "1"; |
| | | String typeCode = "01"; |
| | | return CommonResult.success(iDataDictionaryService |
| | | .list(new LambdaQueryWrapper<DataDictionary>() |
| | | .eq(DataDictionary::getLevel, typeLevel) |
| | | .eq(DataDictionary::getTypeCode, typeCode))); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description search violation type second |
| | | * @Param [] |
| | | **/ |
| | | @ApiOperation(value = "查询所属大类") |
| | | @GetMapping("/query/type_second") |
| | | public CommonResult searchViolationsTypeSecond() { |
| | | String typeLevel = "2"; |
| | | String typeCode = "01"; |
| | | return CommonResult.success(iDataDictionaryService |
| | | .list(new LambdaQueryWrapper<DataDictionary>() |
| | | .eq(DataDictionary::getLevel, typeLevel) |
| | | .eq(DataDictionary::getTypeCode, typeCode))); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description search violation type third |
| | | * @Param [] |
| | | **/ |
| | | @ApiOperation(value = "查询所属小类") |
| | | @GetMapping("/query/type_third") |
| | | public CommonResult searchViolationsTypeThird() { |
| | | String typeLevel = "3"; |
| | | String typeCode = "01"; |
| | | return CommonResult.success(iDataDictionaryService |
| | | .list(new LambdaQueryWrapper<DataDictionary>() |
| | | .eq(DataDictionary::getLevel, typeLevel) |
| | | .eq(DataDictionary::getTypeCode, typeCode))); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description search violation type four |
| | | * @Param [] |
| | | **/ |
| | | @ApiOperation(value = "查询所属案由") |
| | | @GetMapping("/query/type_four") |
| | | public CommonResult searchViolationsTypeFour() { |
| | | String typeLevel = "4"; |
| | | String typeCode = "01"; |
| | | return CommonResult.success(iDataDictionaryService |
| | | .list(new LambdaQueryWrapper<DataDictionary>() |
| | | .eq(DataDictionary::getLevel, typeLevel) |
| | | .eq(DataDictionary::getTypeCode, typeCode))); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description search violation event type |
| | | * @Param [] |
| | | **/ |
| | | @ApiOperation(value = "查询事件等级类型") |
| | | @GetMapping("/query/event_type") |
| | | public CommonResult searchViolationsEventType() { |
| | | String typeLevel = "1"; |
| | | String typeCode = "02"; |
| | | return CommonResult.success(iDataDictionaryService |
| | | .list(new LambdaQueryWrapper<DataDictionary>() |
| | | .eq(DataDictionary::getLevel, typeLevel) |
| | | .eq(DataDictionary::getTypeCode, typeCode))); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description modify violation type |
| | | * @Param [typeFirst, id] |
| | | **/ |
| | | @ApiOperation(value = "修改所属类型/大类/小类/案由") |
| | | @PutMapping("/modification/type") |
| | | public CommonResult modifyViolationTypeFirst(@RequestParam String type, @RequestParam Integer id) { |
| | | return CommonResult.success(iDataDictionaryService |
| | | .update(new LambdaUpdateWrapper<DataDictionary>() |
| | | .eq(DataDictionary::getId, id) |
| | | .set(StringUtils.isNotBlank(type), DataDictionary::getName, type))); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description addition violation type |
| | | * @Param [dataDictionary] |
| | | **/ |
| | | @ApiOperation(value = "添加所属类型/大类/小类/案由") |
| | | @PostMapping("/addition/type") |
| | | public CommonResult addViolationType(@RequestBody @Validated DataDictionary dataDictionary) { |
| | | return CommonResult.success(iDataDictionaryService.save(dataDictionary)); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.dto.casePool; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @Data |
| | | public class IllegalBuildingParam { |
| | | /** |
| | | * 问题类别(1-违规 2-违建) |
| | | */ |
| | | @ApiModelProperty(value = "问题类别(1-违规 2-违建", dataType = "Integer") |
| | | @NotNull(message = "不允许问题类型为空") |
| | | private Integer category; |
| | | |
| | | /** |
| | | * 违建类别 |
| | | */ |
| | | @ApiModelProperty(value = "违建类别", dataType = "Integer") |
| | | @NotBlank(message = "不允许违建类别为空") |
| | | private Integer categoryId; |
| | | |
| | | |
| | | /** |
| | | * 所属社区 |
| | | */ |
| | | @ApiModelProperty(value = "所属社区", dataType = "Integer") |
| | | @NotBlank(message = "不允许所属社区为空") |
| | | private Integer communityId; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 报警点位 事发地点 |
| | | */ |
| | | @ApiModelProperty(value = "事发地点", dataType = "String") |
| | | @NotBlank(message = "不允许事发地点为空") |
| | | private String site; |
| | | |
| | | /** |
| | | * 当事人姓名 |
| | | */ |
| | | @ApiModelProperty(value = "当事人姓名", dataType = "String") |
| | | @NotBlank(message = "不允许当事人姓名为空") |
| | | private String partyName; |
| | | |
| | | /** |
| | | * 当事人身份证号码 |
| | | */ |
| | | @ApiModelProperty(value = "当事人身份证号码", dataType = "String") |
| | | @NotBlank(message = "不允许当事人身份证号码为空") |
| | | private String partyIdCard; |
| | | |
| | | /** |
| | | * 当事人联系电话 |
| | | */ |
| | | @ApiModelProperty(value = "事发地点", dataType = "String") |
| | | @NotBlank(message = "不允许事发地点为空") |
| | | private String partyPhone; |
| | | |
| | | /** |
| | | * 身份证正面 |
| | | */ |
| | | @ApiModelProperty(value = "身份证正面", dataType = "String") |
| | | @NotBlank(message = "不允许身份证正面为空") |
| | | private String positive; |
| | | |
| | | /** |
| | | * 身份证反面 |
| | | */ |
| | | @ApiModelProperty(value = "身份证反面", dataType = "String") |
| | | @NotBlank(message = "不允许身份证反面为空") |
| | | private String negative; |
| | | |
| | | /** |
| | | * 违建具体位置 |
| | | */ |
| | | @ApiModelProperty(value = "违建具体位置", dataType = "String") |
| | | @NotBlank(message = "不允许违建具体位置为空") |
| | | private String position; |
| | | |
| | | /** |
| | | * 违建长 |
| | | */ |
| | | @ApiModelProperty(value = "违建长", dataType = "String") |
| | | @NotBlank(message = "不允许违建长为空") |
| | | private Float buildingLength; |
| | | |
| | | /** |
| | | * 违建宽 |
| | | */ |
| | | @ApiModelProperty(value = "违建宽", dataType = "String") |
| | | @NotBlank(message = "不允许违建宽为空") |
| | | private Float buildingWidth; |
| | | |
| | | /** |
| | | * 违建高 |
| | | */ |
| | | @ApiModelProperty(value = "违建高", dataType = "String") |
| | | @NotBlank(message = "不允许违建高为空") |
| | | private Float buildingHigh; |
| | | |
| | | /** |
| | | * 违建面积 |
| | | */ |
| | | @ApiModelProperty(value = "违建面积", dataType = "String") |
| | | @NotBlank(message = "不允许违建面积为空") |
| | | private Float buildingArea; |
| | | |
| | | /** |
| | | * 违建材料 |
| | | */ |
| | | @ApiModelProperty(value = "违建材料", dataType = "String") |
| | | @NotBlank(message = "不允许违建材料为空") |
| | | private String materials; |
| | | } |
New file |
| | |
| | | package com.ycl.dto.casePool; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @Data |
| | | public class ViolationParam { |
| | | /** |
| | | * 问题类别(1-违规 2-违建) |
| | | */ |
| | | @ApiModelProperty(value = "问题类别(1-违规 2-违建", dataType = "Integer") |
| | | @NotNull(message = "不允许问题类型为空") |
| | | private Integer category; |
| | | |
| | | /** |
| | | * 大类 |
| | | */ |
| | | @ApiModelProperty(value = "大类", dataType = "Integer") |
| | | @NotNull(message = "不允许大类为空") |
| | | private Integer categoryId; |
| | | |
| | | /** |
| | | * 小类 |
| | | */ |
| | | @ApiModelProperty(value = "小类", dataType = "Integer") |
| | | @NotNull(message = "不允许小类为空") |
| | | private Integer typeId; |
| | | |
| | | /** |
| | | * 所属街道 |
| | | */ |
| | | @ApiModelProperty(value = "所属街道", dataType = "Integer") |
| | | @NotNull(message = "不允许所属街道为空") |
| | | private Integer streetId; |
| | | |
| | | /** |
| | | * 所属社区 |
| | | */ |
| | | @ApiModelProperty(value = "所属社区", dataType = "Integer") |
| | | @NotBlank(message = "不允许所属社区为空") |
| | | private Integer communityId; |
| | | |
| | | |
| | | /** |
| | | * 案由 |
| | | */ |
| | | @ApiModelProperty(value = "案由", dataType = "String") |
| | | @NotBlank(message = "不允许案由为空") |
| | | private String actionCause; |
| | | |
| | | |
| | | /** |
| | | * 报警点位 事发地点 |
| | | */ |
| | | @ApiModelProperty(value = "事发地点", dataType = "String") |
| | | @NotBlank(message = "不允许事发地点为空") |
| | | private String site; |
| | | |
| | | /** |
| | | * 是否关联商铺 |
| | | */ |
| | | @ApiModelProperty(value = "是否关联商铺", dataType = "Boolean") |
| | | private Integer linkShop; |
| | | |
| | | /** |
| | | * 关联商铺名称 |
| | | */ |
| | | @ApiModelProperty(value = "关联商铺名称", dataType = "String") |
| | | private String shopName; |
| | | |
| | | /** |
| | | * 车牌号 |
| | | */ |
| | | @ApiModelProperty(value = "车牌号", dataType = "String") |
| | | private String carNumber; |
| | | |
| | | /** |
| | | * 问题描述 |
| | | */ |
| | | @ApiModelProperty(value = "问题描述", dataType = "String") |
| | | @NotBlank(message = "不允许问题描述为空") |
| | | private String description; |
| | | |
| | | /** |
| | | * 反映人 |
| | | */ |
| | | @ApiModelProperty(value = "反映人", dataType = "String") |
| | | private String informant; |
| | | |
| | | /** |
| | | * 反映人联系方式 |
| | | */ |
| | | @ApiModelProperty(value = "反映人联系方式", dataType = "String") |
| | | private String informantPhoneCode; |
| | | |
| | | /** |
| | | * 身份证号码 |
| | | */ |
| | | @ApiModelProperty(value = "身份证号码", dataType = "String") |
| | | private String informantIdCard; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("ums_base_case") |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class BaseCase implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | @TableField("task_code") |
| | | private String taskCode; |
| | | |
| | | |
| | | } |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField("close_time") |
| | | private LocalDateTime closeTime; |
| | | } |
| | |
| | | * 是否关联商铺 |
| | | */ |
| | | @TableField("link_shop") |
| | | private Boolean linkShop; |
| | | private Integer linkShop; |
| | | |
| | | /** |
| | | * 关联商铺名称 |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("ums_data_dictionary") |
| | | @ApiModel(value = "字典表") |
| | | public class DataDictionary implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主键",dataType = "Long") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 字典值 |
| | | */ |
| | | @TableField("name") |
| | | @ApiModelProperty(value = "违规中的类型/大类/小类/案由,违建中的/类型/类别",dataType = "String") |
| | | @NotBlank(message = "字典值为空") |
| | | private String name; |
| | | |
| | | /** |
| | | * 编码 |
| | | */ |
| | | @TableField("code") |
| | | @ApiModelProperty(value = "编码 ps:暂时不传",dataType = "String") |
| | | @NotBlank(message = "编码为空") |
| | | private String code; |
| | | |
| | | /** |
| | | * 父级id |
| | | */ |
| | | @TableField("parent_id") |
| | | @ApiModelProperty(value = "父级id ps:为上一级的id",dataType = "String") |
| | | private String parentId; |
| | | |
| | | /** |
| | | * 层级 |
| | | */ |
| | | @TableField("level") |
| | | @ApiModelProperty(value = "级别:违规中类型/大类/小类/案由 分别是1/2/3/4 ,违建中类型/类别 分别是1/2",dataType = "Integer") |
| | | @NotNull(message = "层级为空") |
| | | private Short level; |
| | | |
| | | /** |
| | | * 字典类型 |
| | | */ |
| | | @TableField("type_name") |
| | | @ApiModelProperty(value = "字典类型:违规为问题类型,违建为违建类型",dataType = "String") |
| | | @NotBlank(message = "字典类型为空") |
| | | private String typeName; |
| | | |
| | | /** |
| | | * 字典类型代码 |
| | | */ |
| | | @TableField("type_code") |
| | | @ApiModelProperty(value = "字典类型代码:违规为'01',违建为'06'",dataType = "String") |
| | | @NotBlank(message = "字典类型为空") |
| | | private String typeCode; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @TableField("remark") |
| | | @ApiModelProperty(value = "备注 ps:预留字段",dataType = "String") |
| | | private String remark; |
| | | |
| | | } |
| | |
| | | package com.ycl.mapper.caseHandler; |
| | | |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.bo.casePool.CasePoolIllegalBuildingDO; |
| | | import com.ycl.bo.casePool.CasePoolViolationDO; |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2022-09-24 |
| | | */ |
| | | public interface BaseCaseMapper extends BaseMapper<BaseCase> { |
| | | Page<CasePoolViolationDO> listViolationsPage(Page page, Integer state, Integer type, Integer resource); |
| | | |
| | | Page<CasePoolIllegalBuildingDO> listIllegalBuildingsPage(Page page, Integer state, Integer type, Integer resource); |
| | | } |
| | |
| | | package com.ycl.service.caseHandler; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.dto.casePool.IllegalBuildingParam; |
| | | import com.ycl.dto.casePool.ViolationParam; |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | |
| | | */ |
| | | String uploadEvent(Integer caseId); |
| | | |
| | | Page listViolationsPage(Page page, Integer state, Integer resource); |
| | | |
| | | Page listIllegalBuilding(Page page, Integer state, Integer resource); |
| | | |
| | | Boolean saveViolationCase(ViolationParam violationParam,Integer id); |
| | | |
| | | Boolean saveIllegalBuildingCase(IllegalBuildingParam illegalBuildingParam, Integer id); |
| | | /** |
| | | * 同步案件进度 |
| | | * |
| | |
| | | package com.ycl.service.caseHandler.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.bo.casePool.CasePoolIllegalBuildingDO; |
| | | import com.ycl.bo.casePool.CasePoolViolationDO; |
| | | import com.ycl.dto.casePool.IllegalBuildingParam; |
| | | import com.ycl.dto.casePool.ViolationParam; |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | import com.ycl.entity.caseHandler.IllegalBuilding; |
| | | import com.ycl.entity.caseHandler.Violations; |
| | | import com.ycl.entity.video.VideoAlarmReport; |
| | | import com.ycl.mapper.caseHandler.BaseCaseMapper; |
| | | import com.ycl.mapper.caseHandler.IllegalBuildingMapper; |
| | | import com.ycl.mapper.caseHandler.ViolationsMapper; |
| | | import com.ycl.mapper.dict.DataDictionaryMapper; |
| | | import com.ycl.remote.dto.*; |
| | | import com.ycl.remote.service.CityPlatformService; |
| | | import com.ycl.service.caseHandler.IBaseCaseService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.service.caseHandler.IViolationsService; |
| | | import com.ycl.service.video.IVideoAlarmReportService; |
| | | import com.ycl.vo.casePool.CasePoolIllegalBuildingVO; |
| | | import com.ycl.vo.casePool.CasePoolViolationVO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.Instant; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneOffset; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public void setVideoAlarmReportService(IVideoAlarmReportService videoAlarmReportService) { |
| | | this.videoAlarmReportService = videoAlarmReportService; |
| | | } |
| | | |
| | | @Resource |
| | | BaseCaseMapper baseCaseMapper; |
| | | @Resource |
| | | DataDictionaryMapper dataDictionaryMapper; |
| | | @Resource |
| | | ViolationsMapper violationsMapper; |
| | | @Resource |
| | | IllegalBuildingMapper illegalBuildingMapper; |
| | | |
| | | @Override |
| | | public String uploadEvent(Integer caseId) { |
| | |
| | | return responseDto.getMsg(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Page listViolationsPage(Page page, Integer state, Integer resource) { |
| | | Integer type = 01; |
| | | Page<CasePoolViolationDO> violationsPage = baseCaseMapper.listViolationsPage(page, state, type, resource); |
| | | List<CasePoolViolationVO> violationVOList = violationsPage.getRecords().stream().map(item -> { |
| | | CasePoolViolationVO casePoolViolationVO = new CasePoolViolationVO(); |
| | | BeanUtils.copyProperties(item, casePoolViolationVO); |
| | | if (item.getCloseTime() == null) { |
| | | long nowTime = System.currentTimeMillis(); |
| | | long alarmTime = item.getAlarmTime().toEpochSecond(ZoneOffset.ofHours(8)); |
| | | LocalDateTime continueTimes = Instant.ofEpochMilli(nowTime - alarmTime).atZone(ZoneOffset.ofHours(8)).toLocalDateTime(); |
| | | String continueTime = continueTimes.getHour() + "时" + continueTimes.getSecond() + "分钟"; |
| | | casePoolViolationVO.setContinueTime(continueTime); |
| | | } else { |
| | | long closeTime = item.getCloseTime().toEpochSecond(ZoneOffset.ofHours(8)); |
| | | long alarmTime = item.getAlarmTime().toEpochSecond(ZoneOffset.ofHours(8)); |
| | | LocalDateTime continueTimes = Instant.ofEpochMilli(closeTime - alarmTime).atZone(ZoneOffset.ofHours(8)).toLocalDateTime(); |
| | | String continueTime = continueTimes.getHour() + "时" + continueTimes.getSecond() + "分钟"; |
| | | casePoolViolationVO.setContinueTime(continueTime); |
| | | } |
| | | casePoolViolationVO.setCategory(dataDictionaryMapper.selectById(item.getCategoryId()).getName()); |
| | | casePoolViolationVO.setType(dataDictionaryMapper.selectById(item.getTypeId()).getName()); |
| | | return casePoolViolationVO; |
| | | }).collect(Collectors.toList()); |
| | | Page<CasePoolViolationVO> casePoolViolationVOPage = new Page<>(); |
| | | BeanUtils.copyProperties(violationsPage, casePoolViolationVOPage); |
| | | casePoolViolationVOPage.setRecords(violationVOList); |
| | | return casePoolViolationVOPage; |
| | | } |
| | | |
| | | @Override |
| | | public Page listIllegalBuilding(Page page, Integer state, Integer resource) { |
| | | Integer type = 02; |
| | | Page<CasePoolIllegalBuildingDO> casePoolIllegalBuildingDTOPage = baseCaseMapper.listIllegalBuildingsPage(page, state, type, resource); |
| | | List<CasePoolIllegalBuildingVO> casePoolIllegalBuildingVOList = casePoolIllegalBuildingDTOPage |
| | | .getRecords() |
| | | .stream() |
| | | .map( |
| | | item -> { |
| | | CasePoolIllegalBuildingVO casePoolIllegalBuildingVO = new CasePoolIllegalBuildingVO(); |
| | | BeanUtils.copyProperties(item, casePoolIllegalBuildingVO); |
| | | casePoolIllegalBuildingVO.setCategory(dataDictionaryMapper.selectById(item.getCategoryId()).getName()); |
| | | return casePoolIllegalBuildingVO; |
| | | } |
| | | ).collect(Collectors.toList()); |
| | | Page<CasePoolIllegalBuildingVO> casePoolViolationVOPage = new Page<>(); |
| | | BeanUtils.copyProperties(casePoolIllegalBuildingDTOPage, casePoolViolationVOPage); |
| | | casePoolViolationVOPage.setRecords(casePoolIllegalBuildingVOList); |
| | | return casePoolViolationVOPage; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean saveViolationCase(ViolationParam violationParam, Integer id) { |
| | | BaseCase baseCase = new BaseCase(); |
| | | Violations violations = new Violations(); |
| | | BeanUtils.copyProperties(violationParam, baseCase); |
| | | BeanUtils.copyProperties(violationParam, violations); |
| | | violations.setId(id); |
| | | Integer value = 1; |
| | | return violationsMapper.insert(violations) == value ? true : false; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean saveIllegalBuildingCase(IllegalBuildingParam illegalBuildingParam, Integer id) { |
| | | BaseCase baseCase = new BaseCase(); |
| | | IllegalBuilding illegalBuilding = new IllegalBuilding(); |
| | | BeanUtils.copyProperties(illegalBuilding, baseCase); |
| | | BeanUtils.copyProperties(illegalBuilding, illegalBuildingParam); |
| | | illegalBuilding.setBaseCaseId(id); |
| | | Integer value = 1; |
| | | return illegalBuildingMapper.insert(illegalBuilding) == value ? true : false; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.vo.casePool; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ApiModel("案件池违建立案件") |
| | | public class CasePoolIllegalBuildingVO { |
| | | |
| | | /** |
| | | * 事件编号 |
| | | */ |
| | | @ApiModelProperty(value = "事件编号", dataType = "String") |
| | | private String code; |
| | | |
| | | /** |
| | | * 事件来源(1-视频 2-手动登记) |
| | | */ |
| | | @ApiModelProperty(value = "事件来源(1-视频 2-手动登记)", dataType = "Integer") |
| | | private Integer eventSource; |
| | | |
| | | /** |
| | | * 违建类别 |
| | | */ |
| | | @ApiModelProperty(value = "违建类别", dataType = "String") |
| | | private String category; |
| | | |
| | | /** |
| | | * 所属社区 |
| | | */ |
| | | @ApiModelProperty(value = "所属社区", dataType = "Integer") |
| | | private Integer communityId; |
| | | |
| | | /** |
| | | * 违建地点 |
| | | */ |
| | | @ApiModelProperty(value = "违建地点", dataType = "String") |
| | | private String site; |
| | | |
| | | /** |
| | | * 违建长 |
| | | */ |
| | | @ApiModelProperty(value = "违建长", dataType = "Integer") |
| | | private Float buildingLength; |
| | | |
| | | /** |
| | | * 违建宽 |
| | | */ |
| | | @ApiModelProperty(value = "违建宽", dataType = "Integer") |
| | | private Float buildingWidth; |
| | | |
| | | /** |
| | | * 违建高 |
| | | */ |
| | | @ApiModelProperty(value = "违建高", dataType = "Float") |
| | | private Float buildingHigh; |
| | | |
| | | /** |
| | | * 违建面积 |
| | | */ |
| | | @ApiModelProperty(value = "违建面积", dataType = "Float") |
| | | private Float buildingArea; |
| | | |
| | | /** |
| | | * 违建材料 |
| | | */ |
| | | @ApiModelProperty(value = "违建材料", dataType = "String") |
| | | private String materials; |
| | | } |
New file |
| | |
| | | package com.ycl.vo.casePool; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ApiModel("案件池违规案件") |
| | | public class CasePoolViolationVO { |
| | | |
| | | /** |
| | | * 事件编号 |
| | | */ |
| | | @ApiModelProperty(value = "事件编号", dataType = "String") |
| | | private String code; |
| | | |
| | | /** |
| | | * 事件来源(1-视频 2-手动登记) |
| | | */ |
| | | @ApiModelProperty(value = "事件来源(1-视频 2-手动登记)", dataType = "Integer") |
| | | private Integer eventSource; |
| | | |
| | | |
| | | /** |
| | | * 报警点位 事发地点 |
| | | */ |
| | | @ApiModelProperty(value = "报警点位", dataType = "String") |
| | | private String site; |
| | | |
| | | /** |
| | | * 所属街道 |
| | | */ |
| | | @ApiModelProperty(value = "所属街道", dataType = "Integer") |
| | | private Integer streetId; |
| | | |
| | | /** |
| | | * 报警时间 |
| | | */ |
| | | @ApiModelProperty(value = "报警时间", dataType = "LocalDateTime") |
| | | private LocalDateTime alarmTime; |
| | | |
| | | |
| | | /** |
| | | * 大类 |
| | | */ |
| | | @ApiModelProperty(value = "大类", dataType = "String") |
| | | private String category; |
| | | |
| | | /** |
| | | * 小类 |
| | | */ |
| | | @ApiModelProperty(value = "小类", dataType = "String") |
| | | private String type; |
| | | |
| | | |
| | | /** |
| | | * 案由 |
| | | */ |
| | | @ApiModelProperty(value = "案由", dataType = "String") |
| | | private String actionCause; |
| | | |
| | | /** |
| | | * 持续时间 |
| | | */ |
| | | @ApiModelProperty(value = "持续时间", dataType = "String") |
| | | private String continueTime; |
| | | } |
| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.entity.caseHandler.BaseCase"> |
| | | <id column="id" property="id" /> |
| | | <result column="code" property="code" /> |
| | | <result column="event_source" property="eventSource" /> |
| | | <result column="category" property="category" /> |
| | | <result column="street_id" property="streetId" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="site" property="site" /> |
| | | <result column="longitude" property="longitude" /> |
| | | <result column="latitude" property="latitude" /> |
| | | <result column="alarm_time" property="alarmTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="state" property="state" /> |
| | | <result column="handling_opinion" property="handlingOpinion" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="audit_opinion" property="auditOpinion" /> |
| | | <result column="final_opinion" property="finalOpinion" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <id column="id" property="id"/> |
| | | <result column="code" property="code"/> |
| | | <result column="event_source" property="eventSource"/> |
| | | <result column="category" property="category"/> |
| | | <result column="street_id" property="streetId"/> |
| | | <result column="community_id" property="communityId"/> |
| | | <result column="site" property="site"/> |
| | | <result column="longitude" property="longitude"/> |
| | | <result column="latitude" property="latitude"/> |
| | | <result column="alarm_time" property="alarmTime"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="state" property="state"/> |
| | | <result column="handling_opinion" property="handlingOpinion"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="audit_opinion" property="auditOpinion"/> |
| | | <result column="final_opinion" property="finalOpinion"/> |
| | | <result column="create_time" property="createTime"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="settingsResultMap" type="com.ycl.vo.IllegalBuildingSettingVO"> |
| | | <id column="number" property="number"/> |
| | | <result column="type" property="type"/> |
| | | <result column="typeFirst" property="typeFirst"/> |
| | | <result column="typeSecond" property="typeSecond"/> |
| | | <result column="typeThird" property="typeThird"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, code, event_source, category, street_id, community_id, site, longitude, latitude, alarm_time, create_user, state, handling_opinion, remark, audit_opinion, final_opinion, create_time |
| | | id |
| | | , code, event_source, category, street_id, community_id, site, longitude, latitude, alarm_time, create_user, state, handling_opinion, remark, audit_opinion, final_opinion, create_time |
| | | </sql> |
| | | |
| | | <select id="listViolationsPage" resultType="com.ycl.bo.casePool.CasePoolViolationDO"> |
| | | SELECT |
| | | ubc.`code`, |
| | | ubc.event_source, |
| | | uv.category_id, |
| | | uv.type_id, |
| | | uv.action_cause, |
| | | ubc.site, |
| | | ubc.street_id, |
| | | ubc.alarm_time, |
| | | ubc.close_time |
| | | FROM |
| | | `ums_base_case` AS ubc |
| | | JOIN ums_violations AS uv ON ubc.id = uv.id |
| | | <where> |
| | | <if test="state!=null"> |
| | | ubc.state=#{state} |
| | | </if> |
| | | <if test="resource!=null"> |
| | | and ubc.event_source=#{resource} |
| | | </if> |
| | | <if test="type!=null"> |
| | | and ubc.category=#{type} |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | <select id="listIllegalBuildingsPage" resultType="com.ycl.bo.casePool.CasePoolIllegalBuildingDO"> |
| | | SELECT |
| | | ubc.`code`, |
| | | ubc.event_source, |
| | | uib.category_id, |
| | | ubc.site, |
| | | ubc.community_id, |
| | | uib.building_high, |
| | | uib.building_width, |
| | | uib.building_length, |
| | | uib.building_area, |
| | | uib.materials |
| | | FROM |
| | | `ums_base_case` AS ubc |
| | | JOIN ums_illegal_building AS uib ON ubc.id = uib.base_case_id |
| | | <where> |
| | | <if test="state!=null"> |
| | | ubc.state=#{state} |
| | | </if> |
| | | <if test="resource!=null"> |
| | | and ubc.event_source=#{resource} |
| | | </if> |
| | | <if test="type!=null"> |
| | | and ubc.category=#{type} |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | </mapper> |