| | |
| | | import com.ycl.bo.AdminUserDetails; |
| | | import com.ycl.bo.casePool.CasePoolIllegalBuildingDO; |
| | | import com.ycl.bo.casePool.CasePoolViolationDO; |
| | | import com.ycl.common.util.DateUtil; |
| | | import com.ycl.dto.casePool.IllegalBuildingParam; |
| | | import com.ycl.dto.casePool.ViolationParam; |
| | | import com.ycl.entity.caseHandler.*; |
| | |
| | | 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); |
| | |
| | | } |
| | | //2.2查询处置流程环节配置 |
| | | List<WorkflowConfigStep> listWcs = workflowConfigStepMapper.selectRecordByWorkflowConfigStepId(ddlcId); |
| | | //处理用环节时间 |
| | | for (WorkflowConfigStep step : listWcs) { |
| | | DisposeRecord record = step.getDisposeRecord(); |
| | | System.out.println(baseCase.getAlarmTime()); |
| | | System.out.println(record.getCreateTime()); |
| | | System.out.println(DateUtil.fromLocalDateTime(baseCase.getAlarmTime())); |
| | | System.out.println(DateUtil.fromLocalDateTime(record.getCreateTime())); |
| | | System.out.println( DateUtil.getDistanceDateTime( |
| | | DateUtil.fromLocalDateTime(baseCase.getAlarmTime()), |
| | | DateUtil.fromLocalDateTime(record.getCreateTime()))); |
| | | record.setLinkTime( |
| | | DateUtil.getDistanceDateTime( |
| | | DateUtil.fromLocalDateTime(baseCase.getAlarmTime()), |
| | | DateUtil.fromLocalDateTime(record.getCreateTime()))); |
| | | step.setDisposeRecord(record); |
| | | } |
| | | //2.3设置调度流程 |
| | | handlePassVo.setWorkflowConfigSteps(listWcs); |
| | | bcd.setHandlePassVo(handlePassVo); |