From 4ade291ebd74dd4cd42556f07bd4f205f73c3313 Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期三, 28 九月 2022 18:34:22 +0800
Subject: [PATCH] 案件池相关接口

---
 ycl-platform/src/main/java/com/ycl/bo/casePool/CasePoolIllegalBuildingDO.java            |   72 +++
 ycl-platform/src/main/java/com/ycl/controller/caseHandler/IllegalBuildingController.java |   72 +++
 ycl-platform/src/main/java/com/ycl/entity/dict/DataDictionary.java                       |   18 
 ycl-platform/src/main/java/com/ycl/vo/casePool/CasePoolViolationVO.java                  |   69 +++
 ycl-platform/src/main/java/com/ycl/entity/caseHandler/BaseCase.java                      |   14 
 ycl-platform/src/main/java/com/ycl/bo/casePool/CasePoolViolationDO.java                  |   69 +++
 ycl-platform/src/main/java/com/ycl/dto/casePool/ViolationParam.java                      |  104 +++++
 ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java             |   10 
 ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml                    |  102 ++++
 ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java        |  136 +++++++
 ycl-platform/src/main/java/com/ycl/controller/caseHandler/ViolationsController.java      |  139 ++++++
 ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java                    |    2 
 ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java     |  105 +++++
 ycl-platform/src/main/java/com/ycl/vo/casePool/CasePoolIllegalBuildingVO.java            |   73 +++
 ycl-platform/src/main/java/com/ycl/mapper/caseHandler/BaseCaseMapper.java                |    7 
 ycl-platform/src/main/java/com/ycl/dto/casePool/IllegalBuildingParam.java                |  118 ++++++
 16 files changed, 1,072 insertions(+), 38 deletions(-)

diff --git a/ycl-platform/src/main/java/com/ycl/bo/casePool/CasePoolIllegalBuildingDO.java b/ycl-platform/src/main/java/com/ycl/bo/casePool/CasePoolIllegalBuildingDO.java
new file mode 100644
index 0000000..de34a54
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/bo/casePool/CasePoolIllegalBuildingDO.java
@@ -0,0 +1,72 @@
+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;
+}
diff --git a/ycl-platform/src/main/java/com/ycl/bo/casePool/CasePoolViolationDO.java b/ycl-platform/src/main/java/com/ycl/bo/casePool/CasePoolViolationDO.java
new file mode 100644
index 0000000..cfb96c0
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/bo/casePool/CasePoolViolationDO.java
@@ -0,0 +1,69 @@
+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;
+}
diff --git a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
index aa6978b..13eb69e 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
@@ -5,12 +5,23 @@
 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;
 
 
 /**
@@ -23,9 +34,16 @@
  */
 @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) {
@@ -34,12 +52,124 @@
 
     @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()));
+    }
 }
diff --git a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/IllegalBuildingController.java b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/IllegalBuildingController.java
index 3c0e5c5..07c9d13 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/IllegalBuildingController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/IllegalBuildingController.java
@@ -2,6 +2,7 @@
 
 
 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;
@@ -12,7 +13,10 @@
 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;
 
 
 /**
@@ -58,4 +62,72 @@
         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));
+    }
+
 }
\ No newline at end of file
diff --git a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/ViolationsController.java b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/ViolationsController.java
index fcdf6a6..b5ab37d 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/ViolationsController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/ViolationsController.java
@@ -1,6 +1,9 @@
 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;
@@ -10,7 +13,10 @@
 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;
 
 
 /**
@@ -29,30 +35,147 @@
     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));
+    }
+
+
 }
diff --git a/ycl-platform/src/main/java/com/ycl/dto/casePool/IllegalBuildingParam.java b/ycl-platform/src/main/java/com/ycl/dto/casePool/IllegalBuildingParam.java
new file mode 100644
index 0000000..893e947
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/dto/casePool/IllegalBuildingParam.java
@@ -0,0 +1,118 @@
+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 = "涓嶅厑璁歌韩浠借瘉姝i潰涓虹┖")
+    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;
+}
diff --git a/ycl-platform/src/main/java/com/ycl/dto/casePool/ViolationParam.java b/ycl-platform/src/main/java/com/ycl/dto/casePool/ViolationParam.java
new file mode 100644
index 0000000..90853df
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/dto/casePool/ViolationParam.java
@@ -0,0 +1,104 @@
+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;
+}
diff --git a/ycl-platform/src/main/java/com/ycl/entity/caseHandler/BaseCase.java b/ycl-platform/src/main/java/com/ycl/entity/caseHandler/BaseCase.java
index 7426c79..206eee6 100644
--- a/ycl-platform/src/main/java/com/ycl/entity/caseHandler/BaseCase.java
+++ b/ycl-platform/src/main/java/com/ycl/entity/caseHandler/BaseCase.java
@@ -8,9 +8,7 @@
 import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
 
-import lombok.Builder;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
+import lombok.*;
 
 /**
  * <p>
@@ -24,6 +22,8 @@
 @EqualsAndHashCode(callSuper = false)
 @TableName("ums_base_case")
 @Builder
+@AllArgsConstructor
+@NoArgsConstructor
 public class BaseCase implements Serializable {
 
     private static final long serialVersionUID = 1L;
@@ -136,5 +136,9 @@
     @TableField("task_code")
     private String taskCode;
 
-
-}
+    /**
+     * 缁撴潫鏃堕棿
+     */
+    @TableField("close_time")
+    private LocalDateTime closeTime;
+}
\ No newline at end of file
diff --git a/ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java b/ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java
index adbeb23..c557028 100644
--- a/ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java
+++ b/ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java
@@ -60,7 +60,7 @@
      * 鏄惁鍏宠仈鍟嗛摵
      */
     @TableField("link_shop")
-    private Boolean linkShop;
+    private Integer linkShop;
 
     /**
      * 鍏宠仈鍟嗛摵鍚嶇О
diff --git a/ycl-platform/src/main/java/com/ycl/entity/dict/DataDictionary.java b/ycl-platform/src/main/java/com/ycl/entity/dict/DataDictionary.java
index d8656ac..66605c2 100644
--- a/ycl-platform/src/main/java/com/ycl/entity/dict/DataDictionary.java
+++ b/ycl-platform/src/main/java/com/ycl/entity/dict/DataDictionary.java
@@ -4,9 +4,13 @@
 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;
 
 /**
@@ -20,6 +24,7 @@
 @Data
 @EqualsAndHashCode(callSuper = false)
 @TableName("ums_data_dictionary")
+@ApiModel(value = "瀛楀吀琛�")
 public class DataDictionary implements Serializable {
 
     private static final long serialVersionUID = 1L;
@@ -28,48 +33,61 @@
      * 涓婚敭
      */
     @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;
 
     /**
      * 瀛楀吀绫诲瀷浠g爜
      */
     @TableField("type_code")
+    @ApiModelProperty(value = "瀛楀吀绫诲瀷浠g爜:杩濊涓�'01',杩濆缓涓�'06'",dataType = "String")
+    @NotBlank(message = "瀛楀吀绫诲瀷涓虹┖")
     private String typeCode;
 
     /**
      * 澶囨敞
      */
     @TableField("remark")
+    @ApiModelProperty(value = "澶囨敞 ps:棰勭暀瀛楁",dataType = "String")
     private String remark;
 
 }
diff --git a/ycl-platform/src/main/java/com/ycl/mapper/caseHandler/BaseCaseMapper.java b/ycl-platform/src/main/java/com/ycl/mapper/caseHandler/BaseCaseMapper.java
index 39a7192..0554f76 100644
--- a/ycl-platform/src/main/java/com/ycl/mapper/caseHandler/BaseCaseMapper.java
+++ b/ycl-platform/src/main/java/com/ycl/mapper/caseHandler/BaseCaseMapper.java
@@ -1,7 +1,10 @@
 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>
@@ -12,5 +15,7 @@
  * @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);
 }
diff --git a/ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java b/ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java
index 7557069..2174583 100644
--- a/ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java
+++ b/ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java
@@ -1,5 +1,8 @@
 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;
 
@@ -22,6 +25,13 @@
      */
     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);
     /**
      * 鍚屾妗堜欢杩涘害
      *
diff --git a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java
index 353d583..a4b3cd8 100644
--- a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java
+++ b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java
@@ -1,18 +1,37 @@
 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>
@@ -46,6 +65,15 @@
     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) {
@@ -87,4 +115,77 @@
             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;
+    }
+}
\ No newline at end of file
diff --git a/ycl-platform/src/main/java/com/ycl/vo/casePool/CasePoolIllegalBuildingVO.java b/ycl-platform/src/main/java/com/ycl/vo/casePool/CasePoolIllegalBuildingVO.java
new file mode 100644
index 0000000..d946d45
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/vo/casePool/CasePoolIllegalBuildingVO.java
@@ -0,0 +1,73 @@
+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;
+}
diff --git a/ycl-platform/src/main/java/com/ycl/vo/casePool/CasePoolViolationVO.java b/ycl-platform/src/main/java/com/ycl/vo/casePool/CasePoolViolationVO.java
new file mode 100644
index 0000000..780ebb7
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/vo/casePool/CasePoolViolationVO.java
@@ -0,0 +1,69 @@
+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;
+}
diff --git a/ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml b/ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml
index 6c4387e..fd07456 100644
--- a/ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml
+++ b/ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml
@@ -4,28 +4,94 @@
 
     <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
     <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>

--
Gitblit v1.8.0