吉安感知网项目-后端
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.sxkj.resource.service;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springblade.core.mp.base.BaseService;
import org.sxkj.common.model.ResponseResult;
import org.sxkj.resource.dto.WaylineJobInfoQueryParam;
import org.sxkj.resource.entity.Attach;
import org.sxkj.resource.vo.*;
import org.sxkj.system.vo.TreeVo;
 
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;
 
/**
 * 附件表 服务类
 *
 * @author Chill
 */
public interface IAttachService extends BaseService<Attach> {
 
    /**
     * 自定义分页
     *
     * @param page
     * @param attach
     * @return
     */
    IPage<AttachVO> selectAttachPage(IPage<AttachVO> page, AttachVO attach);
 
    /**
     * ai图片
     * @param page
     * @param attach
     * @return
     */
    public IPage<AttachVO> findAttachImages(IPage<AttachVO> page, AttachVO attach);
 
    /**
     * ai数据
     *
     * @param page
     * @param attach
     * @return
     */
    public List<AttachVO> findAiAttachImages(IPage page, AttachVO attach);
 
    /**
     * 查询经纬度数据
     * @param eventRecordIds
     * @return
     */
     List<String> findAiEventMd5s(List<Long> eventRecordIds) ;
    List<DeptAndSizeVo> getDeptAllSize(String startTime,String endTime);
 
    /**
     * 保存附件表信息
     * @param attach 附件表信息
     * @return
     */
    Boolean saveAttachInfo(Attach attach);
 
    /**
     * 删除 附件表及对应的附件信息
     * @param ids
     * @return
     */
    Boolean removeBatchAndDataByIds(List<Long> ids);
    /**
     * 根据附件ID集合获取去除 cloud-bucket 前缀后的 name 列表
     *
     * @param ids 附件ID集合
     * @return 处理后的 name 列表
     */
    List<String> getAttachNames(List<Long> ids);
 
    /**
     * 历史正射图片处理
     * @return
     */
    Boolean hisOrtPicHandler();
 
    /**
     * 查询媒体属性根据图片,名称
     *
     * @param names
     * @return
     */
    public Map<String, Object> findMetaDataByName(@Param("names") List<String> names) ;
 
    void saveMd5();
 
    /**
     * 获取地图上事件位置及数量
     *
     * @param dto 参数
     * @return list
     */
    public TreeVo mapAttachEvents(AttachQueryParam dto) ;
 
    /**
     * 图片分析对比
     *
     * @param id
     * @return
     */
    List<AnalysisAttachVo> contrastiveAnalysis(Long id);
 
    int updateFileName(Long id, String nickName);
 
    public void deletedNotExistsUrl();
 
    /**
     * 获取附件详情
     * @param id
     * @return
     */
    AttachInfoVO getAttachInfo(Long id);
 
    /**
     * 根据任务ID获取附件详情
     * @param jobId
     * @return
     */
    List<AttachInfoVO> getAttachInfoByJobId(String jobId);
 
 
    /**
     * 查询成果数量
     * @param jobId 任务id
     * @return 成果数量
     */
    public Long findResultNumByJobId(String jobId);
 
    /**
     * 批量删除媒体文件
     * @param ids
     * @return
     */
    int deleteMediaFile(List<Long> ids);
 
    /**
     *
     * @param attachStatisticsVo
     * @return
     */
    List<AttachTypeStatisticsVO> attachTypeStatistics(AttachStatisticsVo attachStatisticsVo);
 
    /**
     * 通过md5获取附件对象
     * @param md5
     * @return
     */
    default Attach getAttachByMd5(String md5) {
        return null;
    }
 
    /**
     * 查询昨日上传的附件信息
     * @param resultType
     * 成果类型:0图片,1=视频,2=ai,3=三维,
     * 4=正射,5=全景, 6=图片压缩小(后缀small),
     * 7=图片压缩中(后缀show),8视频一帧图,9视频压缩,
     * 10ai压缩小,11ai压缩中
     * @return  list
     */
    List<Attach> findAttachInfoByYesterday(int resultType, Date startTime, Date endTime);
 
    /**
     *
     * @param param
     * @return
     */
    List<LineColumnDateVo> getManageAttachTypeStatistics(WaylineJobInfoQueryParam param);
 
    /**
     * 删除设备下的所有文件
     * @param deviceSn
     * @param timestamp
     * @param operator
     * @param workspaceId
     * @return
     */
    Boolean deleteAttach(String deviceSn, long timestamp, Long operator, String workspaceId);
 
    /**
     * 获取图斑图片
     * @param lotInfoId
     * @return
     */
    List<Attach> getlotInfoList(Long lotInfoId);
 
    /**
     * 统计三维面积
     * @param deviceSn
     * @param startDate
     * @param endDate
     * @param resultTypes
     * @return
     */
    List<AttachTypeStatisticsVO> calculateTheThreeDimensionalArea(String deviceSn, String startDate, String endDate, String resultTypes, String areaCode);
 
}