| | |
| | | Long patrolRecordReport = Snowflake.getId(); |
| | | comSwPatrolRecordReportDO.setId(patrolRecordReport); |
| | | comSwPatrolRecordReportDO.setPatrolRecordId(patrolRecordId); |
| | | if(StringUtils.isNotEmpty(comSwPatrolRecordAddDTO.getDagerDescription())){ |
| | | comSwPatrolRecordAddDTO.setDangerDescription(comSwPatrolRecordAddDTO.getDagerDescription()); |
| | | } |
| | | if(StringUtils.isNotEmpty(comSwPatrolRecordAddDTO.getDagerName())){ |
| | | comSwPatrolRecordAddDTO.setDangerName(comSwPatrolRecordAddDTO.getDagerName()); |
| | | } |
| | | if (comSwPatrolRecordAddDTO.getIsHiddenDanger().intValue() == ComSwPatrolRecordAddDTO.isOk.yes) { |
| | | //如果存在安全隐患,自动生成安全隐患报告 |
| | | ComSwDangerReportDO comSwDangerReportDO = new ComSwDangerReportDO(); |
| | |
| | | comSwDangerReportDO.setStatus(String.valueOf(SafeWordStatusEnum.DCL.getCode())); |
| | | } |
| | | BeanUtils.copyProperties(comSwPatrolRecordAddDTO, comSwDangerReportDO); |
| | | comSwDangerReportDO.setDangerName(comSwPatrolRecordAddDTO.getDagerName()); |
| | | comSwDangerReportDO.setDagerDescription(comSwPatrolRecordAddDTO.getDagerDescription()); |
| | | comSwDangerReportDO.setPersonName(comSwPatrolRecordAddDTO.getDPersonName()); |
| | | comSwDangerReportDO.setPersonPhone(comSwPatrolRecordAddDTO.getDPersonPhone()); |
| | | comSwDangerReportDAO.insert(comSwDangerReportDO); |