BAOLH
2025-12-02 898e49a7446ab8cb7f1595b436d0c872cd14f4fe
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/repository/AttendanceBusinessTravelRepository.java
@@ -52,10 +52,6 @@
    @Query(value = "SELECT * from attendance_business_travel where user_id = ?1 and travel_start_time <= ?3 and travel_end_time >= ?2 and approval_status in ('business_approve_status_agree')", nativeQuery = true)
    List<AttendanceBusinessTravel> findByUserAndSEDate(Long userId, LocalDateTime startDate, LocalDateTime endDate);
    // 查询出差天数
    @Query(value = "SELECT * from attendance_business_travel where user_id = ?1 and travel_start_time >= ?2 and travel_end_time < ?3 and approval_status in ('business_approve_status_agree')", nativeQuery = true)
    List<AttendanceBusinessTravel> findByUserIdAndYearMonth(Long userId, LocalDateTime startDate, LocalDateTime endDate);
    // 查询某天出差总时长
    @Query(value = "SELECT COALESCE(SUM(travel_duration), 0) FROM attendance_business_travel WHERE user_id = ?2 AND approval_status IN ('business_approve_status_reviewed', 'business_approve_status_agree') AND id != ?3 AND travel_start_time LIKE CONCAT(?1, '%')", nativeQuery = true)
    BigDecimal countTravelDuration(String date, Long userId, Long id);