feat(task): 添加任务结果附件类型字段支持
- 在 GdTaskResultDTO 中新增 attachmentType 字段定义
- 更新数据库映射文件中的插入语句以包含附件类型字段
- 修改转换逻辑以正确处理附件类型的值传递
- 移除对已废弃 dateType 字段的依赖
- 完善实体类与 DTO 之间的数据映射关系
- 确保附件类型数据的持久化存储功能
| | |
| | | private String fileType; |
| | | |
| | | /** |
| | | * 附件类型:1媒体文件; 2ai文件; 3主视频; |
| | | */ |
| | | @ApiModelProperty(value = "附件类型:1媒体文件; 2ai文件; 3主视频;") |
| | | private Integer attachmentType; |
| | | |
| | | /** |
| | | * GeoJSON格式数据 |
| | | */ |
| | | @ApiModelProperty(value = "GeoJSON格式数据") |
| | |
| | | patrol_task_id, result_code, result_url, shoot_time, |
| | | photo_data, longitude, latitude, distribute_status, area_code, |
| | | create_user, create_dept, create_time, update_user, update_time, |
| | | status, is_deleted |
| | | status, is_deleted, attachment_type |
| | | ) VALUES |
| | | <foreach collection="list" item="item" separator=","> |
| | | ( |
| | | #{item.patrolTaskId}, #{item.resultCode}, #{item.resultUrl}, #{item.shootTime}, |
| | | CASE WHEN #{item.photoData} IS NULL THEN NULL ELSE CAST(#{item.photoData} AS JSONB) END, #{item.longitude}, #{item.latitude}, #{item.distributeStatus}, #{item.areaCode}, |
| | | #{item.createUser}, #{item.createDept}, #{item.createTime}, #{item.updateUser}, #{item.updateTime}, |
| | | #{item.status}, #{item.isDeleted} |
| | | #{item.status}, #{item.isDeleted}, #{item.attachmentType} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | |
| | | private GdTaskResultEntity convertDtoToEntity(GdTaskResultDTO dto) { |
| | | GdTaskResultEntity entity = BeanUtil.copy(dto, GdTaskResultEntity.class); |
| | | |
| | | if (dto.getDateType() != null) { |
| | | if (dto.getAttachmentType() != null) { |
| | | entity.setAttachmentType(dto.getAttachmentType()); |
| | | } else if (dto.getDateType() != null) { |
| | | entity.setAttachmentType(dto.getDateType()); |
| | | } |
| | | |