ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
@@ -70,7 +70,8 @@ @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") @ApiImplicitParam(name = "type", value = "01 违规,02 违建", dataType = "Integer"), @ApiImplicitParam(name = "resource", value = "事件来源(1-视频 2-手动登记)", dataType = "Integer") }) public CommonResult searchViolation(@RequestParam Integer size, @RequestParam Integer current, @@ -153,9 +154,11 @@ @ApiOperation(value = "添加违规案件") @PostMapping("/addition_violation") public CommonResult addViolationCase(@RequestBody @Validated ViolationParam violationParam) { Integer eventResource=2; BaseCase baseCase = new BaseCase(); BeanUtils.copyProperties(violationParam, baseCase); baseCaseService.save(baseCase); baseCase.setEventSource(eventResource); return CommonResult.success(baseCaseService.saveViolationCase(violationParam, baseCase.getId())); } @@ -167,9 +170,21 @@ @ApiOperation(value = "添加违建案件") @PostMapping("/addition_illegal_building") public CommonResult addIllegalBuildingCase(@RequestBody @Validated IllegalBuildingParam illegalBuildingParam) { Integer eventResource=2; BaseCase baseCase = new BaseCase(); BeanUtils.copyProperties(illegalBuildingParam, baseCase); baseCaseService.save(baseCase); baseCase.setEventSource(eventResource); return CommonResult.success(baseCaseService.saveIllegalBuildingCase(illegalBuildingParam, baseCase.getId())); } @ApiOperation("人工路径案件图片展示") @GetMapping("/hand_work_case_images") @ApiImplicitParams({ @ApiImplicitParam(name = "type", value = "01 违规,02 违建", dataType = "Integer") }) public CommonResult queryCaseImages(@RequestParam Integer id,@RequestParam Integer type){ return CommonResult.success(baseCaseService.listCaseImages(id,type)); } } ycl-platform/src/main/java/com/ycl/dto/casePool/IllegalBuildingParam.java
@@ -11,14 +11,14 @@ /** * 问题类别(1-违规 2-违建) */ @ApiModelProperty(value = "问题类别(1-违规 2-违建", dataType = "Integer") @ApiModelProperty(value = "问题类别(1-违规 2-违建") @NotNull(message = "不允许问题类型为空") private Integer category; /** * 违建类别 */ @ApiModelProperty(value = "违建类别", dataType = "Integer") @ApiModelProperty(value = "违建类别") @NotBlank(message = "不允许违建类别为空") private Integer categoryId; @@ -26,7 +26,7 @@ /** * 所属社区 */ @ApiModelProperty(value = "所属社区", dataType = "Integer") @ApiModelProperty(value = "所属社区") @NotBlank(message = "不允许所属社区为空") private Integer communityId; @@ -35,84 +35,84 @@ /** * 报警点位 事发地点 */ @ApiModelProperty(value = "事发地点", dataType = "String") @ApiModelProperty(value = "事发地点") @NotBlank(message = "不允许事发地点为空") private String site; /** * 当事人姓名 */ @ApiModelProperty(value = "当事人姓名", dataType = "String") @ApiModelProperty(value = "当事人姓名") @NotBlank(message = "不允许当事人姓名为空") private String partyName; /** * 当事人身份证号码 */ @ApiModelProperty(value = "当事人身份证号码", dataType = "String") @ApiModelProperty(value = "当事人身份证号码") @NotBlank(message = "不允许当事人身份证号码为空") private String partyIdCard; /** * 当事人联系电话 */ @ApiModelProperty(value = "事发地点", dataType = "String") @ApiModelProperty(value = "事发地点") @NotBlank(message = "不允许事发地点为空") private String partyPhone; /** * 身份证正面 */ @ApiModelProperty(value = "身份证正面", dataType = "String") @ApiModelProperty(value = "身份证正面") @NotBlank(message = "不允许身份证正面为空") private String positive; /** * 身份证反面 */ @ApiModelProperty(value = "身份证反面", dataType = "String") @ApiModelProperty(value = "身份证反面") @NotBlank(message = "不允许身份证反面为空") private String negative; /** * 违建具体位置 */ @ApiModelProperty(value = "违建具体位置", dataType = "String") @ApiModelProperty(value = "违建具体位置") @NotBlank(message = "不允许违建具体位置为空") private String position; /** * 违建长 */ @ApiModelProperty(value = "违建长", dataType = "String") @ApiModelProperty(value = "违建长") @NotBlank(message = "不允许违建长为空") private Float buildingLength; /** * 违建宽 */ @ApiModelProperty(value = "违建宽", dataType = "String") @ApiModelProperty(value = "违建宽") @NotBlank(message = "不允许违建宽为空") private Float buildingWidth; /** * 违建高 */ @ApiModelProperty(value = "违建高", dataType = "String") @ApiModelProperty(value = "违建高") @NotBlank(message = "不允许违建高为空") private Float buildingHigh; /** * 违建面积 */ @ApiModelProperty(value = "违建面积", dataType = "String") @ApiModelProperty(value = "违建面积") @NotBlank(message = "不允许违建面积为空") private Float buildingArea; /** * 违建材料 */ @ApiModelProperty(value = "违建材料", dataType = "String") @ApiModelProperty(value = "违建材料") @NotBlank(message = "不允许违建材料为空") private String materials; } ycl-platform/src/main/java/com/ycl/dto/casePool/ViolationParam.java
@@ -11,35 +11,35 @@ /** * 问题类别(1-违规 2-违建) */ @ApiModelProperty(value = "问题类别(1-违规 2-违建", dataType = "Integer") @ApiModelProperty(value = "问题类别(1-违规 2-违建") @NotNull(message = "不允许问题类型为空") private Integer category; /** * 大类 */ @ApiModelProperty(value = "大类", dataType = "Integer") @ApiModelProperty(value = "大类") @NotNull(message = "不允许大类为空") private Integer categoryId; /** * 小类 */ @ApiModelProperty(value = "小类", dataType = "Integer") @ApiModelProperty(value = "小类") @NotNull(message = "不允许小类为空") private Integer typeId; /** * 所属街道 */ @ApiModelProperty(value = "所属街道", dataType = "Integer") @ApiModelProperty(value = "所属街道") @NotNull(message = "不允许所属街道为空") private Integer streetId; /** * 所属社区 */ @ApiModelProperty(value = "所属社区", dataType = "Integer") @ApiModelProperty(value = "所属社区") @NotBlank(message = "不允许所属社区为空") private Integer communityId; @@ -47,7 +47,7 @@ /** * 案由 */ @ApiModelProperty(value = "案由", dataType = "String") @ApiModelProperty(value = "案由") @NotBlank(message = "不允许案由为空") private String actionCause; @@ -55,50 +55,50 @@ /** * 报警点位 事发地点 */ @ApiModelProperty(value = "事发地点", dataType = "String") @ApiModelProperty(value = "事发地点") @NotBlank(message = "不允许事发地点为空") private String site; /** * 是否关联商铺 */ @ApiModelProperty(value = "是否关联商铺", dataType = "Boolean") @ApiModelProperty(value = "是否关联商铺(0否1是)") private Integer linkShop; /** * 关联商铺名称 */ @ApiModelProperty(value = "关联商铺名称", dataType = "String") @ApiModelProperty(value = "关联商铺名称") private String shopName; /** * 车牌号 */ @ApiModelProperty(value = "车牌号", dataType = "String") @ApiModelProperty(value = "车牌号") private String carNumber; /** * 问题描述 */ @ApiModelProperty(value = "问题描述", dataType = "String") @ApiModelProperty(value = "问题描述") @NotBlank(message = "不允许问题描述为空") private String description; /** * 反映人 */ @ApiModelProperty(value = "反映人", dataType = "String") @ApiModelProperty(value = "反映人") private String informant; /** * 反映人联系方式 */ @ApiModelProperty(value = "反映人联系方式", dataType = "String") @ApiModelProperty(value = "反映人联系方式") private String informantPhoneCode; /** * 身份证号码 */ @ApiModelProperty(value = "身份证号码", dataType = "String") @ApiModelProperty(value = "身份证号码") private String informantIdCard; } ycl-platform/src/main/java/com/ycl/entity/caseHandler/DisposeRecord.java
@@ -83,4 +83,16 @@ private LocalDateTime createTime; /** * 结果 */ @TableField("result") private String result; /** * 限制时限 */ @TableField("limit_time") private LocalDateTime limitTime; } ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java
@@ -1,10 +1,12 @@ package com.ycl.service.caseHandler; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; 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; import java.util.ArrayList; /** * <p> @@ -29,9 +31,10 @@ Page listIllegalBuilding(Page page, Integer state, Integer resource); Boolean saveViolationCase(ViolationParam violationParam,Integer id); Boolean saveViolationCase(ViolationParam violationParam, Integer id); Boolean saveIllegalBuildingCase(IllegalBuildingParam illegalBuildingParam, Integer id); /** * 同步案件进度 * @@ -41,4 +44,6 @@ * @date 2022-09-28 17:45 */ String processEvent(Integer caseId); ArrayList<String> listCaseImages(Integer id, Integer type); } ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java
@@ -1,21 +1,18 @@ package com.ycl.service.caseHandler.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.caseHandler.*; 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.caseHandler.*; import com.ycl.mapper.dict.DataDictionaryMapper; import com.ycl.remote.dto.*; import com.ycl.remote.service.CityPlatformService; import com.ycl.remote.dto.EventAddParamDto; import com.ycl.remote.dto.EventProcessParamDto; import com.ycl.service.caseHandler.IBaseCaseService; import com.ycl.service.caseHandler.IViolationsService; import com.ycl.service.video.IVideoAlarmReportService; @@ -30,6 +27,7 @@ import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneOffset; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -74,6 +72,12 @@ ViolationsMapper violationsMapper; @Resource IllegalBuildingMapper illegalBuildingMapper; @Resource InvestigationMapper investigationMapper; @Resource ArrivalSituationMapper arrivalSituationMapper; @Resource WritMapper writMapper; @Override public String uploadEvent(Integer caseId) { @@ -190,4 +194,24 @@ Integer value = 1; return illegalBuildingMapper.insert(illegalBuilding) == value ? true : false; } @Override public ArrayList<String> listCaseImages(Integer id, Integer type) { Integer illegalBuildingType = 02; ArrayList<String> caseImages = new ArrayList<>(); caseImages.add(investigationMapper .selectOne(new LambdaQueryWrapper<Investigation>() .eq(Investigation::getBaseCaseId, id)).getPic()); caseImages.add(arrivalSituationMapper .selectOne(new LambdaQueryWrapper<ArrivalSituation>() .eq(ArrivalSituation::getBaseCaseId, id)).getSituationPic()); if (type == illegalBuildingType) { Writ writ = writMapper.selectOne(new LambdaQueryWrapper<Writ>().eq(Writ::getBaseCaseId, id)); caseImages.add(writ.getWritPic()); caseImages.add(writ.getOriginalPic()); caseImages.add(writ.getOtherPic()); caseImages.add(writ.getRectifiedPic()); } return caseImages; } }