吉安感知网项目-后端
xiebin
2026-01-06 d207a86cdf1ab52ef8cb7cd83bad8fceab8038cf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package org.sxkj.resource.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.sxkj.common.model.OdmUrlDto;
import org.sxkj.resource.entity.MediaFileEntity;
import org.sxkj.resource.model.EventHistoryDto;
import org.sxkj.resource.model.MediaFileQueryParam;
import org.sxkj.resource.model.MediaJobDTO;
import org.sxkj.resource.model.SearchMediaParam;
import org.sxkj.resource.vo.JobStatisticsTimeVoBo;
import org.sxkj.resource.vo.MediaFileCountVO;
 
import java.time.LocalDateTime;
import java.util.List;
 
/**
 * @author sean
 * @version 0.2
 * @date 2021/12/9
 */
@Mapper
public interface IFileMapper extends BaseMapper<MediaFileEntity> {
    Page<MediaFileEntity> getPage(@Param("page") Page<MediaFileEntity> mediaFileEntityPage, @Param("workspaceId") String workspaceId, @Param("query") MediaFileQueryParam mediaFileQueryParam);
 
    Page<MediaJobDTO> mediaPage(@Param("page") Page<MediaJobDTO> mediaFileEntityPage, @Param("workspaceId") String workspaceId, @Param("param") SearchMediaParam param);
 
    /**
     * 查询odm
     *
     * @param workspaceId
     * @param dkbhList
     * @param
     * @return
     */
    List<OdmUrlDto> getOdm(@Param("workspaceId") String workspaceId,
                           List<String> dkbhList,
                           @Param("startTime") String startTime,
                           @Param("endTime") String endTime);
 
    Page<MediaJobDTO> mediaDetail(Page<MediaJobDTO> mediaJobDTOPage, @Param("jobId") String jobId, @Param("fileAddress") String fileAddress);
 
    /**
     * 查询媒体文件信息
     *
     * @param objectKey
     * @return
     */
    MediaFileEntity getMediaFileByObjectKey(@Param("objectKey") String objectKey);
 
    /**
     * 媒体文件信息更新
     *
     * @param objectKey
     * @param objectName
     * @return
     */
    int updateMediaFileByObjectKey(@Param("objectKey") String objectKey, @Param("minObjectKey") String objectName);
 
    MediaFileEntity getMediaFieByTid(@Param("deviceId") String deviceId, @Param("timestamp") String timestamp);
 
 
    /**
     * 批量删除媒体文件
     *
     * @param ids 要删除的文件的 objectKey 列表
     * @return 删除的记录数量
     */
    int batchDeleteByKeys(@Param("ids") List<Long> ids);
 
    /**
     * 根据类型获取数据成果数量
     * @param resultType 成果类型:0图片,1=视频,2=ai,3=三维,4=正射
     * @return 成果数量
     */
    MediaFileCountVO getMediaFileCountByResultType(@Param("resultType") Integer resultType,
                                                   @Param("areaCode") String areaCode,
                                                   @Param("deptIdList") List<Long> deptIdList,
                                                   @Param("permissionCondition") String permissionCondition);
 
    /**
     * 获取三维成果面积
     * @param resultType
     * @param areaCode
     * @param deptIdList
     * @param permissionCondition
     * @return
     */
    MediaFileCountVO calculateTheThreeDimensionalArea(@Param("resultType") Integer resultType,
                                                   @Param("areaCode") String areaCode,
                                                   @Param("deptIdList") List<Long> deptIdList,
                                                   @Param("permissionCondition") String permissionCondition);
 
    /**
     *
     * @param resultType
     * @param areaCode
     * @return
     */
    MediaFileCountVO getCountByResultType(@Param("resultType") Integer resultType, @Param("areaCode") String areaCode);
 
 
    public List<MediaFileEntity> findNearByMediaUrl(EventHistoryDto dto);
 
    public List<JobStatisticsTimeVoBo>timeEventNumStatistics(@Param("startDate") LocalDateTime startDate,@Param("endDate") LocalDateTime endDate, @Param("areaCode")String areaCode,
 
                                                             @Param("formatTime") String formatTime);
 
    public Long countEventNumStatistics(@Param("startDate") LocalDateTime startDate,@Param("endDate") LocalDateTime endDate, @Param("areaCode")String areaCode);
}