72 lines
2.7 KiB
XML
72 lines
2.7 KiB
XML
|
<?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.PunchClockAdminMapper">
|
||
|
<!--打卡条件查询-->
|
||
|
<select id="PunchClockListForCondition" resultType="com.haitongauto.models.pojo.PunchClock">
|
||
|
select
|
||
|
applet_punch_clock.id,
|
||
|
applet_punch_clock.users_id,
|
||
|
appointment_id,
|
||
|
applet_punch_clock.biz_type,
|
||
|
queue_number,
|
||
|
start_time,
|
||
|
over_time,
|
||
|
applet_punch_clock.port_area_id,
|
||
|
punch_address,
|
||
|
over_address,
|
||
|
punch_clock_type,
|
||
|
punch_clock_poi,
|
||
|
applet_punch_clock.create_time,
|
||
|
applet_punch_clock.update_time,
|
||
|
applet_punch_clock.is_del
|
||
|
from applet_punch_clock
|
||
|
join applet_appointment on applet_punch_clock.appointment_id=applet_appointment.id
|
||
|
join applet_users on applet_punch_clock.users_id=applet_users.id
|
||
|
join applet_truck on applet_punch_clock.users_id=applet_truck.users_id
|
||
|
where applet_punch_clock.is_del=0
|
||
|
<if test="users_id!=null and users_id!=''">
|
||
|
and applet_punch_clock.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="biz_type!=null and biz_type!=''">
|
||
|
and biz_type=#{biz_type}
|
||
|
</if>
|
||
|
<if test="keywords!=null and keywords!=''">
|
||
|
and (applet_users.users_name like concat('%',#{keywords},'%') or applet_truck.truck_number like concat('%',#{keywords},'%') or applet_users.tel_number like concat('%',#{keywords},'%'))
|
||
|
</if>
|
||
|
<if test="approach_date!=null and approach_date!=''">
|
||
|
and to_char(applet_appointment.approach_date,'yyyy-mm-dd')=#{approach_date}
|
||
|
</if>
|
||
|
<if test="sign_in_state==0">
|
||
|
and ISNULL(punch_clock_type)
|
||
|
</if>
|
||
|
<if test="sign_in_state==1">
|
||
|
and punch_clock_type >= 1
|
||
|
</if>
|
||
|
<if test="punch_state==0">
|
||
|
and punch_clock_type<4
|
||
|
</if>
|
||
|
<if test="punch_state==1">
|
||
|
and (punch_clock_type=4 or punch_clock_type=5)
|
||
|
</if>
|
||
|
order by create_time desc
|
||
|
</select>
|
||
|
|
||
|
<select id="getPunchClockListExportByIds" resultType="com.haitongauto.models.pojo.PunchClock">
|
||
|
select *
|
||
|
from applet_punch_clock
|
||
|
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>
|
||
|
|
||
|
</mapper>
|