From 7e5bfd8737b33a06cadb433461ed7e52d99ccba7 Mon Sep 17 00:00:00 2001 From: wl <173@qq.com> Date: 星期四, 29 九月 2022 13:06:53 +0800 Subject: [PATCH] 案件池修改 案件图片展示 --- ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java | 17 +++++ ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java | 40 ++++++++++-- ycl-platform/src/main/java/com/ycl/dto/casePool/ViolationParam.java | 28 ++++---- ycl-platform/src/main/java/com/ycl/dto/casePool/IllegalBuildingParam.java | 30 +++++----- ycl-platform/src/main/java/com/ycl/entity/caseHandler/DisposeRecord.java | 12 ++++ ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java | 9 ++ 6 files changed, 96 insertions(+), 40 deletions(-) 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 fd638a9..fdc4bdc 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 @@ -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)); + } + } 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 index 893e947..e946f92 100644 --- a/ycl-platform/src/main/java/com/ycl/dto/casePool/IllegalBuildingParam.java +++ b/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 = "涓嶅厑璁歌韩浠借瘉姝i潰涓虹┖") 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; } 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 index 90853df..3966a9c 100644 --- a/ycl-platform/src/main/java/com/ycl/dto/casePool/ViolationParam.java +++ b/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; } diff --git a/ycl-platform/src/main/java/com/ycl/entity/caseHandler/DisposeRecord.java b/ycl-platform/src/main/java/com/ycl/entity/caseHandler/DisposeRecord.java index 26b3d38..87aaa07 100644 --- a/ycl-platform/src/main/java/com/ycl/entity/caseHandler/DisposeRecord.java +++ b/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; + } 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 2174583..142d3e4 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,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); } 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 a4cd580..5a1a799 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,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; + } } \ No newline at end of file -- Gitblit v1.8.0