rtos-mini-service4/mapper/target/classes/mappers/admin/AppointmentAdminMapper.xml

104 lines
3.6 KiB
XML
Raw Normal View History

2024-06-13 15:27:54 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.haitongauto.mapper.admin.AppointmentAdminMapper">
<!--预约条件查询-->
<select id="AppointmentListForCondition" resultType="com.haitongauto.models.pojo.Appointment">
select
applet_appointment.id,
applet_appointment.users_id,
transport_type,
truck_number,
applet_appointment.tel_number,
vehicle_weight,
vehicle_frame_weight,
driving_license,
approach_date,
port_area_id,
enter_type,
goods_type,
goods_Quantity,
biz_type,
appointment_state,
cancel_time,
applet_appointment.create_time,
applet_appointment.update_time,
applet_appointment.appointment_type,
applet_appointment.is_del,
yard,
gate_canal_in,
gate_canal_out,
gate_canal_in_time,
gate_canal_out_time,
instruct_state,
send_time,
sender,
check_in_time,
check_over_time
from applet_appointment join applet_users on applet_appointment.users_id=applet_users.id
where applet_appointment.is_del=0
<if test="users_id!=null and users_id!=''">
and applet_appointment.users_id=#{users_id}
</if>
<if test="port_area_id!=null and port_area_id!=''" >
and port_area_id=#{port_area_id}
</if>
<if test="keywords!=null and keywords!=''">
and (applet_users.users_name like concat('%',#{keywords},'%') or truck_number like concat('%',#{keywords},'%') or applet_appointment.tel_number like concat('%',#{keywords},'%'))
</if>
<if test="start_date!=null and start_date!=''">
and to_char(applet_appointment.create_time,'yyyy-mm-dd')&gt;=#{start_date}
</if>
<if test="end_date!=null and end_date!=''">
and to_char(applet_appointment.create_time,'yyyy-mm-dd')&lt;=#{end_date}
</if>
<if test="enter_type!=null and enter_type!=''">
and enter_type=#{enter_type}
</if>
<if test="appointment_state==0">
and appointment_state = 4
</if>
<if test="appointment_state==1">
and appointment_state &lt;&gt;4 and appointment_state&lt;&gt;9
</if>
<if test="transport_type!=null and transport_type!=''">
and transport_type=#{transport_type}
</if>
order by applet_appointment.create_time desc
</select>
<select id="AppointmentListExportyByIds" resultType="com.haitongauto.models.pojo.Appointment">
select *
from applet_appointment
where is_del=0
<if test="list!=null">
and id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
order by create_time desc
</select>
<!--获取指定预约的货物明细-->
<select id="appointmentGoodsDetail" resultType="com.haitongauto.models.pojo.AppointmentDetail">
select
id,
appointment_id,
ship_id,
ship_name,
voy_number,
destination_port,
destination_port_id,
brand_id,
brand_name,
vin,
create_time,
update_time,
is_del
from applet_appointment_detail
where is_del=0 and appointment_id=#{appointment_id}
order by create_time desc
</select>
</mapper>