| | |
| | | |
| | | @Override |
| | | public R pagePatrolRecord(ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO) { |
| | | //是否是查询自己的巡查记录 |
| | | if(StringUtils.isNotEmpty(comSwPatrolRecordPageDTO.getPatrolPerson())){ |
| | | Map<String,Object> map = comSwPatrolRecordDAO.getPbServiceTeamCardNo(comSwPatrolRecordPageDTO.getPatrolPerson()); |
| | | if(map != null){ |
| | | comSwPatrolRecordPageDTO.setPatrolPerson(map.get("id").toString()); |
| | | } |
| | | } |
| | | IPage<ComSwPatrolRecordVO> iPage = comSwPatrolRecordDAO.pagePatrolRecord(new Page(comSwPatrolRecordPageDTO.getPageNum(),comSwPatrolRecordPageDTO.getPageSize()), comSwPatrolRecordPageDTO); |
| | | if(!iPage.getRecords().isEmpty()){ |
| | | iPage.getRecords().forEach(patrol -> { |
| | |
| | | .lambda().eq(ComSwPatrolRecordReportDO::getPatrolRecordId,patrol.getId())); |
| | | if(recordReportDO != null){ |
| | | patrol.setServiceId(recordReportDO.getReportId()); |
| | | if (null != comSwDangerReportDAO.selectById(recordReportDO.getReportId())) { |
| | | patrol.setDangerOrRecord(1); |
| | | }else{ |
| | | patrol.setDangerOrRecord(2); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | comSwDangerReportDO.setStatus(String.valueOf(SafeWordStatusEnum.DCL.getCode())); |
| | | } |
| | | BeanUtils.copyProperties(comSwPatrolRecordAddDTO, comSwDangerReportDO); |
| | | comSwDangerReportDO.setDagerDescription(comSwPatrolRecordAddDTO.getDangerDescription()); |
| | | comSwDangerReportDO.setPersonName(comSwPatrolRecordAddDTO.getDPersonName()); |
| | | comSwDangerReportDO.setPersonPhone(comSwPatrolRecordAddDTO.getDPersonPhone()); |
| | | comSwDangerReportDAO.insert(comSwDangerReportDO); |