“mitao”
2026-02-12 d09e1c104aed44b4c2cc3c620ef28f4f5a2ec13a
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
package com.xiaopeng.map.mangodb.service;
 
import com.xiaopeng.api.model.map.XpGeoFencingPolygon;
import com.xiaopeng.common.core.web.service.BaseService;
import com.xiaopeng.map.mangodb.model.GeoPoint;
import org.bson.Document;
import org.springframework.stereotype.Repository;
 
import java.util.List;
 
/**
 * MongoDB Repository for XpGeoFencingPolygon
 * @author zhibing.pu
 * @date 2023/4/29 23:53
 */
@Repository
public interface XpGeoFencingPolygonService extends BaseService<XpGeoFencingPolygon> {
 
    /**
     * 查找包含指定点的所有围栏
     * @param point
     * @param collectionName
     * @param geoFieldName
     * @return
     */
    List<String> findFencesContainingPoint(GeoPoint point, String collectionName, String geoFieldName);
 
    /**
     * 判断点是否在围栏内
     * @param longitude
     * @param latitude
     * @param fenceId
     * @param collectionName
     * @return
     */
    boolean isInFence(double longitude, double latitude, String fenceId, String collectionName);
 
    /**
     * 查找指定父围栏ID的禁行区域点位
     * @param parentId
     * @param parentIdField
     * @param collectionName
     * @return
     */
    List<Document> findPointsByParentId(String parentId, String parentIdField, String collectionName);
}