2025-11-19 17:50:18 +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.nflg.mobilebroken.repository.mapper.GongfuDispatchMapper">
|
|
|
|
|
|
|
|
|
|
<select id="search" resultType="com.nflg.mobilebroken.common.pojo.vo.DispatchVO">
|
2025-11-24 17:53:06 +08:00
|
|
|
SELECT da.*,dv.customer_name,bc.agency_company_name as agent_name,af.reason as "delayReason"
|
2025-11-19 17:50:18 +08:00
|
|
|
FROM gongfu_dispatch da
|
|
|
|
|
LEFT JOIN v_gongfu_device dv ON da.device_no=dv.device_no
|
|
|
|
|
LEFT JOIN t_base_customer bc ON dv.agent_code=bc.agency_company_code
|
2025-11-24 17:53:06 +08:00
|
|
|
left join v_dispatch_applyfor af on da.id=af.ticket_id
|
2025-11-19 17:50:18 +08:00
|
|
|
<where>
|
|
|
|
|
<if test="request.deviceNo!=null and request.deviceNo!=''">
|
|
|
|
|
AND da.device_no=#{request.deviceNo}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.handlerUserName!=null and request.handlerUserName!=''">
|
|
|
|
|
AND da.handler_user_name LIKE CONCAT('%',#{request.handlerUserName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.customerName!=null and request.customerName!=''">
|
|
|
|
|
AND dv.customer_name LIKE CONCAT('%',#{request.customerName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.state!=null">
|
|
|
|
|
AND da.state=#{request.state}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.category!=null">
|
|
|
|
|
AND da.category= #{request.category}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.createUserName!=null and request.createUserName!=''">
|
|
|
|
|
AND da.create_by LIKE CONCAT('%',#{request.createUserName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.startDate!=null">
|
|
|
|
|
AND da.plan_start_date >= #{request.startDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.endDate!=null">
|
|
|
|
|
AND da.plan_end_date >= #{request.endDate}
|
|
|
|
|
</if>
|
2025-11-24 17:53:06 +08:00
|
|
|
<if test="request.key!=null and request.key!=''">
|
|
|
|
|
AND (da.device_no like concat('%',#{request.key},'%')
|
|
|
|
|
or da.handler_user_name like concat('%',#{request.key},'%')
|
|
|
|
|
or da.title like concat('%',#{request.key},'%')
|
|
|
|
|
or dv.customer_name like concat('%',#{request.key},'%')
|
|
|
|
|
)
|
|
|
|
|
</if>
|
2025-11-19 17:50:18 +08:00
|
|
|
</where>
|
2025-11-26 18:03:19 +08:00
|
|
|
ORDER BY da.state,da.id DESC
|
2025-11-19 17:50:18 +08:00
|
|
|
</select>
|
2025-11-24 17:53:06 +08:00
|
|
|
|
|
|
|
|
<select id="getInfo" resultType="com.nflg.mobilebroken.common.pojo.vo.DispatchVO">
|
2025-11-26 18:03:19 +08:00
|
|
|
SELECT da.*,dv.customer_name,bc.agency_company_name as agent_name,af.reason as "delayReason"
|
2025-11-24 17:53:06 +08:00
|
|
|
FROM gongfu_dispatch da
|
|
|
|
|
LEFT JOIN v_gongfu_device dv ON da.device_no=dv.device_no
|
|
|
|
|
LEFT JOIN t_base_customer bc ON dv.agent_code=bc.agency_company_code
|
2025-11-26 18:03:19 +08:00
|
|
|
left join v_dispatch_applyfor af on da.id=af.ticket_id
|
2025-11-24 17:53:06 +08:00
|
|
|
where da.id = #{id}
|
|
|
|
|
</select>
|
2025-11-19 17:50:18 +08:00
|
|
|
</mapper>
|