管灌系统巡查员智能手机App
app/src/main/java/com/dayu/pipirrapp/dao/InspectionLocationDao.java
@@ -32,12 +32,19 @@
    InspectionLocationBean findFirst();
    //查询所有没有上传的坐标
    @Query("select  * from InspectionLocationBean where isPost=false")
    List<InspectionLocationBean> findByNoPost();
    @Query("select  * from InspectionLocationBean where isPost=false AND mInspectId=:mInspectId ORDER BY locateTime ASC")
    Single<List<InspectionLocationBean>> findByNoPostAndInspectId(String mInspectId);
    //查询所有该巡检id的坐标
    @Query("select  * from InspectionLocationBean where mInspectId=:mInspectId ORDER BY locateTime ASC")
    Single<List<InspectionLocationBean>> findByInspectId(String mInspectId);
    //查询所有未上传的mInspectId
    @Query("SELECT DISTINCT mInspectId FROM InspectionLocationBean WHERE isPost = false")
    Single<List<String>> getUnpostedMInspectIds();
    //更新所有mInspectId下的已上传状态
    @Query("UPDATE InspectionLocationBean SET isPost = true WHERE mInspectId = :mInspectId")
    Completable updataByInspectIdSetIsPost(String mInspectId);
}