管灌系统巡查员智能手机App
zuoxiao
2024-12-18 32275aa66faa5371467e291b7d19a5e782f8aade
app/src/main/java/com/dayu/pipirrapp/dao/InspectionDao.java
@@ -19,7 +19,7 @@
    Completable insert(InspectionBean inspectionBean);
    @Update
    void update(InspectionBean inspectionBean);
    Completable update(InspectionBean inspectionBean);
    @Delete
    void delete(InspectionBean inspectionBean);
@@ -27,8 +27,18 @@
    @Query("DELETE FROM InspectionBean")
    void deleteAll();
    //查询当前没有关闭巡检的巡检ID
    @Query("SELECT * FROM InspectionBean WHERE stopTime IS NULL OR stopTime = '' ORDER BY startTime DESC LIMIT 1")
    Single<InspectionBean> getMostRecentInspectionWithNoStopTime();
    /**
     * 根据本地巡检id查询巡检记录信息
     *
     * @param mInspectId
     * @return
     */
    @Query("SELECT * FROM InspectionBean WHERE mInspectId  =:mInspectId  ORDER BY startTime DESC LIMIT 1")
    Single<InspectionBean> findBymInspectId(String mInspectId);
}