mg
2022-10-02 8d0e312443876371e2be7ae9a2cb70e4f73bb2cd
Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server
9个文件已修改
113 ■■■■■ 已修改文件
ycl-common/src/main/java/com/ycl/controller/depart/DepartController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/bo/casePool/CasePoolIllegalBuildingDO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/bo/casePool/CasePoolViolationDO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dto/casePool/IllegalBuildingParam.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/vo/casePool/CasePoolIllegalBuildingVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/vo/casePool/CasePoolViolationVO.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-common/src/main/java/com/ycl/controller/depart/DepartController.java
@@ -67,11 +67,13 @@
     * @Param [ids]
     * @return com.ycl.api.CommonResult<java.lang.Void>
     **/
    @ApiOperation("删除")
    @PostMapping(value = "/batch_deletion)")
    public CommonResult<Void> delete(@RequestParam String[] ids) {
        departService.removeBatchByIds(Arrays.asList(ids));
        return CommonResult.success(null);
    @ApiOperation("批处理-删除")
    @PostMapping(value = "/batch_deletion")
    public CommonResult delete(@RequestParam List<Long> ids) {
        if (ids.isEmpty()){
            return CommonResult.failed("bad request parameter");
        }
        return CommonResult.success(departService.removeBatchByIds(ids));
    }
    @ApiOperation("详情")
ycl-platform/src/main/java/com/ycl/bo/casePool/CasePoolIllegalBuildingDO.java
@@ -9,6 +9,8 @@
@ApiModel("案件池违建立案件")
public class CasePoolIllegalBuildingDO {
    private Integer id;
    /**
     * 事件编号
     */
ycl-platform/src/main/java/com/ycl/bo/casePool/CasePoolViolationDO.java
@@ -10,6 +10,8 @@
@ApiModel("案件池违规案件")
public class CasePoolViolationDO {
    private Integer id;
    /**
     * 事件编号
     */
ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
@@ -25,7 +25,6 @@
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
@@ -136,22 +135,21 @@
     * @Description delete illegal buildings or violations
     * @Param [ids, type]
     **/
    @ApiOperation(value = "删除违规/违建案件")
    @ApiOperation(value = "批处理-删除违规/违建案件")
    @DeleteMapping("/batch_deletion")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "1 违规,2 违建", dataType = "Integer")
    })
    public CommonResult removeCases(@RequestParam String[] ids, @RequestParam Integer type) {
    public CommonResult removeCases(@RequestParam List<Long> ids, @RequestParam Integer type) {
        Integer violationType = 1;
        Integer illegalBuildingType = 2;
        List<String> idList = Arrays.asList(ids);
        if (!idList.isEmpty()) {
        if (!ids.isEmpty()) {
            CommonResult.success(baseCaseService.removeBatchByIds(ids));
            if (type == violationType) {
                return CommonResult.success(violationsService.removeBatchByIds(idList));
                return CommonResult.success(violationsService.removeBatchByIds(ids));
            } else if (type == illegalBuildingType) {
                return CommonResult.success(illegalBuildingService.removeBatchByIds(idList));
                return CommonResult.success(illegalBuildingService.removeBatchByIds(ids));
            }
            return CommonResult.success(baseCaseService.removeBatchByIds(idList));
        }
        return CommonResult.failed("request parameter is null");
    }
@@ -224,7 +222,7 @@
    @ApiOperation(value = "案件状态修改")
    @PutMapping("/case_status_update")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "处理状态(0误报 1上报 2立案 3派遣 4处置 5核查 6结案7处理中8暂不处理)",name = "state")
            @ApiImplicitParam(value = "处理状态(0误报 1上报 2立案 3派遣 4处置 5核查 6结案7处理中8暂不处理)", name = "state")
    })
    public CommonResult updateCaseStatus(@RequestParam Integer caseId, @RequestParam Integer state) {
        return CommonResult.success(baseCaseService
@@ -254,8 +252,8 @@
    @ApiOperation(value = "结案")
    @PutMapping("/end_case")
    public  CommonResult endCase(@RequestParam Integer caseId,@RequestParam String result){
        baseCaseService.endCase(caseId,result);
    public CommonResult endCase(@RequestParam Integer caseId, @RequestParam String result) {
        baseCaseService.endCase(caseId, result);
        return CommonResult.success("end case success~!");
    }
}
}
ycl-platform/src/main/java/com/ycl/dto/casePool/IllegalBuildingParam.java
@@ -81,35 +81,35 @@
     * 违建具体位置
     */
    @ApiModelProperty(value = "违建具体位置")
    @NotBlank(message = "不允许违建具体位置为空")
    @NotNull(message = "不允许违建具体位置为空")
    private String position;
    /**
     * 违建长
     */
    @ApiModelProperty(value = "违建长")
    @NotBlank(message = "不允许违建长为空")
    @NotNull(message = "不允许违建长为空")
    private Float buildingLength;
    /**
     * 违建宽
     */
    @ApiModelProperty(value = "违建宽")
    @NotBlank(message = "不允许违建宽为空")
    @NotNull(message = "不允许违建宽为空")
    private Float buildingWidth;
    /**
     * 违建高
     */
    @ApiModelProperty(value = "违建高")
    @NotBlank(message = "不允许违建高为空")
    @NotNull(message = "不允许违建高为空")
    private Float buildingHigh;
    /**
     * 违建面积
     */
    @ApiModelProperty(value = "违建面积")
    @NotBlank(message = "不允许违建面积为空")
    @NotNull(message = "不允许违建面积为空")
    private Float buildingArea;
    /**
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java
@@ -143,24 +143,27 @@
        Integer type = 01;
        Integer hours = 60;
        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) {
                Duration duration = Duration.between(item.getAlarmTime(), LocalDateTime.now());
                long minutes = duration.toMinutes() - (duration.toHours() * hours);
                String continueTime = duration.toHours() + "时" + minutes + "分钟";
                casePoolViolationVO.setContinueTime(continueTime);
            } else {
                Duration duration = Duration.between(item.getAlarmTime(), item.getCloseTime());
                long minutes = duration.toMinutes() - (duration.toHours() * hours);
                String continueTime = duration.toHours() + "时" + minutes + "分钟";
                casePoolViolationVO.setContinueTime(continueTime);
            }
            casePoolViolationVO.setCategory(dataDictionaryMapper.selectById(item.getCategoryId()).getName());
            casePoolViolationVO.setType(dataDictionaryMapper.selectById(item.getTypeId()).getName());
            return casePoolViolationVO;
        }).collect(Collectors.toList());
        List<CasePoolViolationVO> violationVOList = violationsPage
                .getRecords()
                .stream()
                .map(item -> {
                    CasePoolViolationVO casePoolViolationVO = new CasePoolViolationVO();
                    BeanUtils.copyProperties(item, casePoolViolationVO);
                    if (item.getCloseTime() == null) {
                        Duration duration = Duration.between(item.getAlarmTime(), LocalDateTime.now());
                        long minutes = duration.toMinutes() - (duration.toHours() * hours);
                        String continueTime = duration.toHours() + "时" + minutes + "分钟";
                        casePoolViolationVO.setContinueTime(continueTime);
                    } else {
                        Duration duration = Duration.between(item.getAlarmTime(), item.getCloseTime());
                        long minutes = duration.toMinutes() - (duration.toHours() * hours);
                        String continueTime = duration.toHours() + "时" + minutes + "分钟";
                        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);
ycl-platform/src/main/java/com/ycl/vo/casePool/CasePoolIllegalBuildingVO.java
@@ -11,6 +11,9 @@
@ApiModel("案件池违建立案件")
public class CasePoolIllegalBuildingVO {
    @ApiModelProperty(value = "id")
    private Integer id;
    /**
     * 事件编号
     */
ycl-platform/src/main/java/com/ycl/vo/casePool/CasePoolViolationVO.java
@@ -10,60 +10,63 @@
@ApiModel(value = "案件池违规VO")
public class CasePoolViolationVO {
    @ApiModelProperty(value = "id")
    private Integer id;
    /**
     * 事件编号
     */
    @ApiModelProperty(value = "事件编号", dataType = "String")
    @ApiModelProperty(value = "事件编号")
    private String code;
    /**
     * 事件来源(1-视频 2-手动登记)
     */
    @ApiModelProperty(value = "事件来源(1-视频 2-手动登记)", dataType = "Integer")
    @ApiModelProperty(value = "事件来源(1-视频 2-手动登记)")
    private Integer eventSource;
    /**
     * 报警点位 事发地点
     */
    @ApiModelProperty(value = "报警点位", dataType = "String")
    @ApiModelProperty(value = "报警点位")
    private String site;
    /**
     * 所属街道
     */
    @ApiModelProperty(value = "所属街道", dataType = "Integer")
    @ApiModelProperty(value = "所属街道")
    private Integer streetId;
    /**
     * 报警时间
     */
    @ApiModelProperty(value = "报警时间", dataType = "LocalDateTime")
    @ApiModelProperty(value = "报警时间")
    private LocalDateTime alarmTime;
    /**
     * 大类
     */
    @ApiModelProperty(value = "大类", dataType = "String")
    @ApiModelProperty(value = "大类")
    private String category;
    /**
     * 小类
     */
    @ApiModelProperty(value = "小类", dataType = "String")
    @ApiModelProperty(value = "小类")
    private String type;
    /**
     * 案由
     */
    @ApiModelProperty(value = "案由", dataType = "String")
    @ApiModelProperty(value = "案由")
    private String actionCause;
    /**
     * 持续时间
     */
    @ApiModelProperty(value = "持续时间", dataType = "String")
    @ApiModelProperty(value = "持续时间")
    private String continueTime;
}
ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml
@@ -40,6 +40,7 @@
    <select id="listViolationsPage" resultType="com.ycl.bo.casePool.CasePoolViolationDO">
        SELECT
            ubc.`id`,
        ubc.`code`,
        ubc.event_source,
        uv.category_id,
@@ -68,6 +69,7 @@
    <select id="listIllegalBuildingsPage" resultType="com.ycl.bo.casePool.CasePoolIllegalBuildingDO">
        SELECT
        ubc.`id`,
        ubc.`code`,
        ubc.event_source,
        uib.category_id,