| | |
| | | r.scene_photo, |
| | | r.scene_description |
| | | FROM xp_cruise_check_in_record r |
| | | LEFT JOIN xp_operations_user u ON r.operations_user_id = u.id AND u.del_flag = '0' |
| | | LEFT JOIN xp_check_location cl ON r.check_location_id = cl.id AND cl.del_flag = '0' |
| | | LEFT JOIN xp_cruise_check_in_rule cr ON r.cruise_check_in_rule_id = cr.id AND cr.del_flag = '0' |
| | | WHERE r.del_flag = '0' |
| | | LEFT JOIN xp_operations_user u ON r.operations_user_id = u.id AND u.is_deleted = '0' |
| | | LEFT JOIN xp_check_location cl ON r.check_location_id = cl.id AND cl.is_deleted = '0' |
| | | LEFT JOIN xp_cruise_check_in_rule cr ON r.cruise_check_in_rule_id = cr.id AND cr.is_deleted = '0' |
| | | WHERE r.is_deleted = '0' |
| | | <if test="query.fieldSituation != null"> |
| | | AND r.field_situation = #{query.fieldSituation} |
| | | </if> |
| | |
| | | r.scene_photo, |
| | | r.scene_description |
| | | FROM xp_cruise_check_in_record r |
| | | LEFT JOIN xp_operations_user u ON r.operations_user_id = u.id AND u.del_flag = '0' |
| | | LEFT JOIN xp_check_location cl ON r.check_location_id = cl.id AND cl.del_flag = '0' |
| | | LEFT JOIN xp_cruise_check_in_rule cr ON r.cruise_check_in_rule_id = cr.id AND cr.del_flag = '0' |
| | | LEFT JOIN xp_operations_user u ON r.operations_user_id = u.id AND u.is_deleted = '0' |
| | | LEFT JOIN xp_check_location cl ON r.check_location_id = cl.id AND cl.is_deleted = '0' |
| | | LEFT JOIN xp_cruise_check_in_rule cr ON r.cruise_check_in_rule_id = cr.id AND cr.is_deleted = '0' |
| | | WHERE r.id = #{id} |
| | | AND r.del_flag = '0' |
| | | AND r.is_deleted = '0' |
| | | </select> |
| | | |
| | | <select id="selectCruiseCheckInStatistics" resultMap="CruiseCheckInStatisticsMap"> |
| | |
| | | COUNT(CASE WHEN r.field_situation = 1 THEN 1 END) AS noTraffic, |
| | | COUNT(CASE WHEN r.field_situation = 2 THEN 1 END) AS traffic |
| | | FROM xp_cruise_check_in_record r |
| | | LEFT JOIN xp_cruise_check_in_rule cr ON r.cruise_check_in_rule_id = cr.id AND cr.del_flag = '0' |
| | | LEFT JOIN xp_operations_user u ON r.operations_user_id = u.id AND u.del_flag = '0' |
| | | LEFT JOIN xp_cruise_check_in_rule cr ON r.cruise_check_in_rule_id = cr.id AND cr.is_deleted = '0' |
| | | LEFT JOIN xp_operations_user u ON r.operations_user_id = u.id AND u.is_deleted = '0' |
| | | LEFT JOIN xp_fleet_operations fo ON u.id = fo.operationsUserId |
| | | LEFT JOIN xp_fleet f ON fo.fleetId = f.id |
| | | WHERE r.del_flag = '0' |
| | | WHERE r.is_deleted = '0' |
| | | AND r.check_in_time IS NOT NULL |
| | | <if test="query.ruleName != null and query.ruleName != ''"> |
| | | AND cr.name LIKE CONCAT('%', #{query.ruleName}, '%') |