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/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,