From a8a8b384f755b454242a709d86cfef6377a12d33 Mon Sep 17 00:00:00 2001 From: wl <173@qq.com> Date: 星期一, 12 十二月 2022 17:46:09 +0800 Subject: [PATCH] fix: 对外提供Api --- ycl-platform/src/main/java/com/ycl/dto/cockpitManage/DelayDO.java | 14 ++ ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml | 24 ++++ ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/DelayVO.java | 14 ++ ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java | 101 +++++++++---------- ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EnforcementEventsVO.java | 37 ------- ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java | 1 ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/IDispatchHandleServiceImpl.java | 1 ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/VideoAndAreaVO.java | 16 +++ ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java | 5 ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java | 36 +++++++ ycl-platform/src/main/java/com/ycl/mapper/caseHandler/BaseCaseMapper.java | 7 + ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java | 6 + 12 files changed, 172 insertions(+), 90 deletions(-) diff --git a/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java b/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java index a95b420..06a9f6d 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java +++ b/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java @@ -1,6 +1,8 @@ package com.ycl.controller.cockpit.aiIot; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.ycl.api.CommonResult; +import com.ycl.entity.video.VideoPoint; import com.ycl.service.video.impl.IVideoPointService; import com.ycl.util.CheckApiUtil; import com.ycl.util.VideoUtil; @@ -40,6 +42,7 @@ @Autowired private VideoUtil videoUtil; + @ApiOperation(value = "鐩戞祴鏁版嵁") @GetMapping("/detection") public CommonResult<AIIotVO.DetectionVO> detection(@Validated CockpitVO params) { @@ -57,7 +60,7 @@ @GetMapping("/video") public CommonResult video(@Validated CockpitVO params) { checkApiUtil.cockpit(params); - return CommonResult.success(iVideoPointService.list().stream().map(item -> { + return CommonResult.success(iVideoPointService.list(new LambdaQueryWrapper<VideoPoint>().eq(params.getStreetId()==null,VideoPoint::getStreetId,params.getStreetId())).stream().map(item -> { VideoVO videoVO = new VideoVO(); videoVO.setName(item.getName()); videoVO.setBrand(item.getEquipmentBrand()); diff --git a/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java b/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java index ebfe719..012c29b 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java +++ b/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java @@ -1,10 +1,13 @@ package com.ycl.controller.cockpit.enforcementEvents; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.ycl.api.CommonResult; +import com.ycl.entity.caseHandler.BaseCase; import com.ycl.service.caseHandler.IBaseCaseService; import com.ycl.util.CheckApiUtil; import com.ycl.vo.cockpit.CockpitVO; import com.ycl.vo.cockpit.enforcementEvents.EnforcementEventsVO; +import com.ycl.vo.cockpit.enforcementEvents.VideoAndAreaVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -54,33 +57,40 @@ @ApiOperation(value = "浜嬩欢绫诲瀷") @GetMapping("/type") - public CommonResult<EnforcementEventsVO.TypeAndSourceVO> type(@Validated CockpitVO params) { + public CommonResult type(@Validated CockpitVO params) { checkApiUtil.cockpit(params); - List<EnforcementEventsVO.TypeAndSourceVO1> typeVO1s = new ArrayList<>(); - EnforcementEventsVO.TypeAndSourceVO typeVO = new EnforcementEventsVO.TypeAndSourceVO(); - EnforcementEventsVO.TypeAndSourceVO1 typeVO1 = null; - for (int i = 0; i < 4; i++) { - typeVO1 = new EnforcementEventsVO.TypeAndSourceVO1(); - typeVO1.setName("鍥㈢粨灞�"); - typeVO1.setCount(20); - typeVO1.setRatio(new BigDecimal("0.69").setScale(2, RoundingMode.HALF_UP)); - typeVO1s.add(typeVO1); - } - typeVO.setAll(100); - typeVO.setRecords(typeVO1s); - return CommonResult.success(typeVO); + EnforcementEventsVO.TypeAndSourceVO typeAndSourceVO = new EnforcementEventsVO.TypeAndSourceVO(); + Long allCount = iBaseCaseService.count(); + Long violationCount = iBaseCaseService.count(new LambdaQueryWrapper<BaseCase>().eq(BaseCase::getCategory, "1")); + Long illegalBuildingCount = iBaseCaseService.count(new LambdaQueryWrapper<BaseCase>().eq(BaseCase::getCategory, "2")); + + ArrayList<VideoAndAreaVO> typeAndSourceVO1s = new ArrayList<>(); + VideoAndAreaVO violationVO1 = new VideoAndAreaVO(); + violationVO1.setName("杩濊"); + violationVO1.setCount(violationCount); + violationVO1.setRatio(new BigDecimal(violationCount * 1.0 / allCount).setScale(2, BigDecimal.ROUND_HALF_UP)); + VideoAndAreaVO illegalBuildingVO1 = new VideoAndAreaVO(); + illegalBuildingVO1.setName("杩濆缓"); + illegalBuildingVO1.setCount(illegalBuildingCount); + illegalBuildingVO1.setRatio(new BigDecimal(illegalBuildingCount * 1.0 / allCount).setScale(2, BigDecimal.ROUND_HALF_UP)); + typeAndSourceVO1s.add(violationVO1); + typeAndSourceVO1s.add(illegalBuildingVO1); + typeAndSourceVO.setRecords(typeAndSourceVO1s); + typeAndSourceVO.setAll(allCount); + System.out.println(illegalBuildingCount / allCount); + return CommonResult.success(typeAndSourceVO); } @ApiOperation(value = "瑙嗛鎶撴媿鍛婂彂鐐逛綅") @GetMapping("/video") - public CommonResult<List<EnforcementEventsVO.VideoAndAreaVO>> video(@Validated CockpitVO params) { + public CommonResult video(@Validated CockpitVO params) { checkApiUtil.cockpit(params); - List<EnforcementEventsVO.VideoAndAreaVO> videoVOS = new ArrayList<>(); - EnforcementEventsVO.VideoAndAreaVO videoVO = null; + List<VideoAndAreaVO> videoVOS = new ArrayList<>(); + VideoAndAreaVO videoVO = null; for (int i = 0; i < 4; i++) { - videoVO = new EnforcementEventsVO.VideoAndAreaVO(); + videoVO = new VideoAndAreaVO(); videoVO.setName("鍥㈢粨灞�"); - videoVO.setCount(10); + videoVO.setCount(10L); videoVO.setRatio(new BigDecimal("0.65").setScale(2, RoundingMode.HALF_UP)); videoVOS.add(videoVO); } @@ -91,50 +101,38 @@ @GetMapping("/source") public CommonResult<EnforcementEventsVO.TypeAndSourceVO> source(@Validated CockpitVO params) { checkApiUtil.cockpit(params); - List<EnforcementEventsVO.TypeAndSourceVO1> typeVO1s = new ArrayList<>(); + Long allCount = iBaseCaseService.count(); + Long alCount = iBaseCaseService.count(new LambdaQueryWrapper<BaseCase>().eq(BaseCase::getEventSource, "1")); + Long handCount = iBaseCaseService.count(new LambdaQueryWrapper<BaseCase>().eq(BaseCase::getEventSource, "2")); + List<VideoAndAreaVO> typeVO1s = new ArrayList<>(); EnforcementEventsVO.TypeAndSourceVO typeVO = new EnforcementEventsVO.TypeAndSourceVO(); - EnforcementEventsVO.TypeAndSourceVO1 typeVO1 = null; - for (int i = 0; i < 4; i++) { - typeVO1 = new EnforcementEventsVO.TypeAndSourceVO1(); - typeVO1.setName("鍥㈢粨灞�"); - typeVO1.setCount(20); - typeVO1.setRatio(new BigDecimal("0.69").setScale(2, RoundingMode.HALF_UP)); - typeVO1s.add(typeVO1); - } - typeVO.setAll(100); + VideoAndAreaVO al = new VideoAndAreaVO(); + al.setName("瑙嗛宸℃煡"); + al.setRatio(new BigDecimal(alCount * 1.0 / allCount).setScale(2, BigDecimal.ROUND_HALF_UP)); + al.setCount(alCount); + typeVO1s.add(al); + VideoAndAreaVO hand = new VideoAndAreaVO(); + hand.setName("浜哄伐涓婃姤"); + hand.setRatio(new BigDecimal(handCount * 1.0 / allCount).setScale(2, BigDecimal.ROUND_HALF_UP)); + hand.setCount(handCount); + typeVO1s.add(hand); + typeVO.setAll(allCount); typeVO.setRecords(typeVO1s); return CommonResult.success(typeVO); } @ApiOperation(value = "浜嬩欢鍖哄煙缁熻") @GetMapping("/area") - public CommonResult<List<EnforcementEventsVO.VideoAndAreaVO>> area(@Validated CockpitVO params) { + public CommonResult area(@Validated CockpitVO params) { checkApiUtil.cockpit(params); - List<EnforcementEventsVO.VideoAndAreaVO> videoVOS = new ArrayList<>(); - EnforcementEventsVO.VideoAndAreaVO videoVO = null; - for (int i = 0; i < 4; i++) { - videoVO = new EnforcementEventsVO.VideoAndAreaVO(); - videoVO.setName("鍥㈢粨灞�"); - videoVO.setCount(10); - videoVOS.add(videoVO); - } - return CommonResult.success(videoVOS); + return CommonResult.success(iBaseCaseService.areaCount()); } @ApiOperation(value = "寤惰浜嬩欢") @GetMapping("/delay") - public CommonResult<List<EnforcementEventsVO.DelayVO>> delay(@Validated CockpitVO params) { + public CommonResult delay(@Validated CockpitVO params) { checkApiUtil.cockpit(params); - List<EnforcementEventsVO.DelayVO> delayVOS = new ArrayList<>(); - EnforcementEventsVO.DelayVO delayVO = null; - for (int i = 0; i < 4; i++) { - delayVO = new EnforcementEventsVO.DelayVO(); - delayVO.setCode("201245555555"); - delayVO.setDescription("鍥㈢粨灞�"); - delayVO.setDuration(30); - delayVOS.add(delayVO); - } - return CommonResult.success(delayVOS); + return CommonResult.success(iBaseCaseService.selectDelayList()); } @ApiOperation(value = "浜嬩欢淇℃伅") @@ -146,8 +144,7 @@ infoVO.setWeek(iBaseCaseService.weekCount()); infoVO.setDispatch(iBaseCaseService.dispatchCount()); infoVO.setIdentification(iBaseCaseService.alCount()); - infoVO.setEvent(iBaseCaseService.selectEventList(params.getBeginTime(),params.getEndTime())); + infoVO.setEvent(iBaseCaseService.selectEventList(params.getBeginTime(), params.getEndTime())); return CommonResult.success(infoVO); - } } \ No newline at end of file diff --git a/ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java b/ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java index e31be53..a608f4b 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java +++ b/ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java @@ -189,7 +189,6 @@ checkApiUtil.cockpit(params); LambdaQueryWrapper<TeamConstruction> queryWrapper = new LambdaQueryWrapper<TeamConstruction>().eq(TeamConstruction::getStatus, 1).eq(TeamConstruction::getIsDelete, 0); List<TeamConstruction> list = teamConstructionService.list(queryWrapper); - return CommonResult.success(list); } diff --git a/ycl-platform/src/main/java/com/ycl/dto/cockpitManage/DelayDO.java b/ycl-platform/src/main/java/com/ycl/dto/cockpitManage/DelayDO.java new file mode 100644 index 0000000..f43ac0b --- /dev/null +++ b/ycl-platform/src/main/java/com/ycl/dto/cockpitManage/DelayDO.java @@ -0,0 +1,14 @@ +package com.ycl.dto.cockpitManage; + +import lombok.Data; + +import java.time.LocalDateTime; + +@Data +public class DelayDO { + private String code; + private String description; + private LocalDateTime startTime; + private LocalDateTime endTime; + private LocalDateTime limitTime; +} 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 2857609..540c790 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 @@ -5,13 +5,16 @@ import com.ycl.bo.casePool.CasePoolIllegalBuildingDO; import com.ycl.bo.casePool.CasePoolViolationDO; import com.ycl.dto.caseHandler.QueryForViolationParam; +import com.ycl.dto.cockpitManage.DelayDO; import com.ycl.entity.caseHandler.BaseCase; import com.ycl.vo.casePool.BaseCaseVO; import com.ycl.vo.casePool.CasePoolIllegalBuildingVO; import com.ycl.vo.casePool.CasePoolViolationVO; import com.ycl.vo.casePool.QueryForViolationVO; +import com.ycl.vo.cockpit.enforcementEvents.DelayVO; import com.ycl.vo.cockpit.enforcementEvents.EnforcementEventsVO; import com.ycl.vo.cockpit.enforcementEvents.EventVO; +import com.ycl.vo.cockpit.enforcementEvents.VideoAndAreaVO; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -51,4 +54,8 @@ Integer alCount(); Long selectRegisterCount(); + + List<VideoAndAreaVO> areaCount(); + + List<DelayDO> selectDelayVOList(); } 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 60d799d..db25560 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 @@ -10,7 +10,9 @@ import com.ycl.entity.caseHandler.BaseCaseDetail; import com.ycl.vo.casePool.BaseCaseVO; import com.ycl.vo.casePool.QueryForViolationVO; +import com.ycl.vo.cockpit.enforcementEvents.DelayVO; import com.ycl.vo.cockpit.enforcementEvents.EventVO; +import com.ycl.vo.cockpit.enforcementEvents.VideoAndAreaVO; import java.util.ArrayList; import java.util.List; @@ -80,4 +82,8 @@ Integer alCount(); List<EventVO> selectEventList(String beginTime, String endTime); + + List<VideoAndAreaVO> areaCount(); + + List<DelayVO> selectDelayList(); } 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 d49fcf2..79ba342 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 @@ -17,6 +17,7 @@ import com.ycl.dto.casePool.IllegalBuildingParam; import com.ycl.dto.casePool.VideoInspectParam; import com.ycl.dto.casePool.ViolationParam; +import com.ycl.dto.cockpitManage.DelayDO; import com.ycl.entity.caseHandler.*; import com.ycl.entity.dict.DataDictionary; import com.ycl.entity.resources.ImageResources; @@ -32,15 +33,19 @@ import com.ycl.service.caseHandler.IViolationsService; import com.ycl.service.video.IVideoAlarmReportService; import com.ycl.vo.casePool.*; +import com.ycl.vo.cockpit.enforcementEvents.DelayVO; import com.ycl.vo.cockpit.enforcementEvents.EventVO; +import com.ycl.vo.cockpit.enforcementEvents.VideoAndAreaVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import sun.util.resources.cldr.dyo.LocaleNames_dyo; import javax.annotation.Resource; +import java.math.BigDecimal; import java.time.Duration; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -48,7 +53,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.function.Consumer; /** * <p> @@ -474,4 +478,34 @@ public List<EventVO> selectEventList(String beginTime, String endTime) { return baseCaseMapper.selectEventList(beginTime, endTime); } + + @Override + public List<VideoAndAreaVO> areaCount() { + List<VideoAndAreaVO> areaCountList = baseCaseMapper.areaCount(); + Long allCount = baseCaseMapper.selectCount(new LambdaQueryWrapper<>()); + areaCountList.stream().forEach(item -> item.setRatio(new BigDecimal(item.getCount() * 1.0 / allCount).setScale(2, BigDecimal.ROUND_HALF_UP))); + return areaCountList; + } + + @Override + public List<DelayVO> selectDelayList() { + List<DelayDO> delayDOS = baseCaseMapper.selectDelayVOList(); + ArrayList<DelayVO> delayVOS = new ArrayList<>(); + delayDOS.stream().forEach(item->{ + DelayVO delayVO = new DelayVO(); + delayVO.setDescription(item.getDescription()); + delayVO.setCode(item.getCode()); + Duration between; + if (item.getEndTime()!=null){ + between = Duration.between(item.getEndTime(), item.getLimitTime()); + }else { + between = Duration.between(LocalDateTime.now(), item.getLimitTime()); + } + if (between.isNegative()){ + delayVO.setDuration(between.toMinutes()); + delayVOS.add(delayVO); + } + }); + return delayVOS; + } } \ No newline at end of file diff --git a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/IDispatchHandleServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/IDispatchHandleServiceImpl.java index 90dffc6..18fb476 100644 --- a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/IDispatchHandleServiceImpl.java +++ b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/IDispatchHandleServiceImpl.java @@ -89,6 +89,7 @@ stepNextRecord.setStepName(stepNext.getName()); stepNextRecord.setLimitTime(dispatchInfoParam.getDisposeDate()); stepNextRecord.setHandlerId(dispatchInfoParam.getLawEnforcer()); + stepNextRecord.setHandlerRoleId(stepNext.getRoleId()); //涓婁紶澶勭疆鏈粨鏉� stepNextRecord.setState(0); stepNextRecord.setStartTime(LocalDateTime.now()); diff --git a/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/DelayVO.java b/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/DelayVO.java new file mode 100644 index 0000000..92ba7ab --- /dev/null +++ b/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/DelayVO.java @@ -0,0 +1,14 @@ +package com.ycl.vo.cockpit.enforcementEvents; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class DelayVO { + @ApiModelProperty(value = "浜嬩欢缂栫爜锛堝敮涓�锛�") + private String code; + @ApiModelProperty(value = "浜嬩欢鎻忚堪") + private String description; + @ApiModelProperty(value = "瓒呮湡鏃堕棿锛堝垎閽燂級") + private Long duration; +} diff --git a/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EnforcementEventsVO.java b/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EnforcementEventsVO.java index 12198c3..d0cb203 100644 --- a/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EnforcementEventsVO.java +++ b/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EnforcementEventsVO.java @@ -33,42 +33,9 @@ @ApiModel(description = "浜嬩欢绫诲瀷/浜嬩欢鏉ユ簮") public static class TypeAndSourceVO { @ApiModelProperty(value = "浜嬩欢鐨勬�绘暟") - private Integer all; + private Long all; @ApiModelProperty(value = "浜嬩欢绫诲瀷鐨勬暟閲忋�佸悇鍗犳瘮") - private List<EnforcementEventsVO.TypeAndSourceVO1> records; - } - - @Data - @ApiModel(description = "浜嬩欢绫诲瀷/浜嬩欢鏉ユ簮") - public static class TypeAndSourceVO1 { - @ApiModelProperty(value = "鍚嶇О") - private String name; - @ApiModelProperty(value = "鏁伴噺") - private Integer count; - @ApiModelProperty(value = "姣斾緥") - private BigDecimal ratio; - } - - @Data - @ApiModel(description = "瑙嗛鎶撴媿楂樺彂鐐逛綅/浜嬩欢鍖哄煙缁熻") - public static class VideoAndAreaVO { - @ApiModelProperty(value = "鐐逛綅鍚嶇О") - private String name; - @ApiModelProperty(value = "娆℃暟") - private Integer count; - @ApiModelProperty(value = "鏁版嵁鍗犳瘮") - private BigDecimal ratio; - } - - @Data - @ApiModel(description = "寤惰浜嬩欢") - public static class DelayVO { - @ApiModelProperty(value = "浜嬩欢缂栫爜锛堝敮涓�锛�") - private String code; - @ApiModelProperty(value = "浜嬩欢鎻忚堪") - private String description; - @ApiModelProperty(value = "瓒呮湡鏃堕棿锛堝垎閽燂級") - private Integer duration; + private List<VideoAndAreaVO> records; } @Data diff --git a/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/VideoAndAreaVO.java b/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/VideoAndAreaVO.java new file mode 100644 index 0000000..1ab9734 --- /dev/null +++ b/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/VideoAndAreaVO.java @@ -0,0 +1,16 @@ +package com.ycl.vo.cockpit.enforcementEvents; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class VideoAndAreaVO { + @ApiModelProperty(value = "鐐逛綅鍚嶇О") + private String name; + @ApiModelProperty(value = "娆℃暟") + private Long count; + @ApiModelProperty(value = "鏁版嵁鍗犳瘮") + private BigDecimal ratio; +} \ No newline at end of file diff --git a/ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml b/ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml index 231ef26..0c4512f 100644 --- a/ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml +++ b/ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml @@ -302,4 +302,28 @@ </where> </select> + <select id="areaCount" resultType="com.ycl.vo.cockpit.enforcementEvents.VideoAndAreaVO"> + SELECT + t2.region_name, + COUNT( 1 ) AS count + FROM + `ums_base_case` t1 + LEFT JOIN ums_sccg_region t2 ON t1.street_id = t2.id + GROUP BY + street_id + </select> + + <select id="selectDelayVOList" resultType="com.ycl.dto.cockpitManage.DelayDO"> + SELECT + t1.`code`, + t3.description, + t2.start_time, + t2.end_time, + t2.limit_time + FROM + `ums_base_case` t1 + LEFT JOIN ums_dispose_record t2 ON t1.id = t2.base_case_id + LEFT JOIN ums_violations t3 on t1.id=t3.id + WHERE t2.workflow_config_step_id IN (1,2) + </select> </mapper> \ No newline at end of file -- Gitblit v1.8.0