| | |
| | | GdTaskResultEntity entity = BeanUtil.copy(dto, GdTaskResultEntity.class); |
| | | |
| | | // 步骤1:设置附件类型 |
| | | if (dto.getAttachmentType() != null) { |
| | | entity.setAttachmentType(dto.getAttachmentType()); |
| | | } else if (dto.getDateType() != null) { |
| | | entity.setAttachmentType(dto.getDateType()); |
| | | if (dto.getDateType() != null) { |
| | | if (dto.getDateType().equals(1) && dto.getFileType().equals("视频")) { |
| | | // 录像的视频 |
| | | entity.setAttachmentType(3); |
| | | } else if (dto.getDateType().equals(3) && dto.getFileType().equals("视频")) { |
| | | // 机巢+无人机录像视频 |
| | | entity.setAttachmentType(4); |
| | | } else { |
| | | entity.setAttachmentType(dto.getDateType()); |
| | | } |
| | | } |
| | | |
| | | // 步骤2:处理geojson字段,将字符串数组转换为正确的JSON格式 |