zcloud-gbs-primeport/web-infrastructure/src/main/resources/mapper/VehicleApplyDO.xml

67 lines
2.3 KiB
XML
Raw Normal View History

<?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">
2026-03-06 16:21:51 +08:00
<mapper namespace="com.zcloud.primeport.persistence.mapper.VehicleApplyMapper">
2026-03-10 15:55:35 +08:00
<select id="listPage" resultType="com.zcloud.primeport.persistence.dataobject.VehicleApplyDO">
SELECT
f.id,
f.status_flag,
f.licence_type,
f.licence_type_name,
f.licence_no,
f.vehicle_type,
f.vehicle_type_name,
f.vehicle_belong_type,
f.gate_level_auth_area,
f.audit_flag,
f.mkmj_permission,
f.visit_start_time,
f.visit_end_time,
f.vehicle_corp_id,
f.vehicle_corp_name,
f.vehicle_department_name,
f.vehicle_department_id,
f.employee_vehicle_user_name,
f.employee_vehicle_user_id,
f.emission_standards_name,
f.emission_standards,
f.attachment_id,
f.driving_license_id,
f.inform_sign_id,
f.project_id,
f.project_name,
f.blocked_flag,
a.audit_user_id,
a.audit_user_name,
a.audit_dept_id,
a.audit_dept_name,
a.audit_corp_name,
a.audit_corp_id
FROM
vehicle_apply AS f
LEFT JOIN vehicle_audit AS a ON f.id = a.vehicle_apply_id
AND a.delete_enum = 'FALSE'
AND a.audit_status = 1
WHERE
f.delete_enum = 'FALSE'
<if test="parmas.licenceNo != null and parmas.licenceNo != ''">
AND f.licence_no like CONCAT('%', #{parmas.licenceNo}, '%')
</if>
<if test="parmas.auditFlag != null">
AND f.audit_flag = #{parmas.auditFlag}
</if>
<if test="parmas.visitStartTime != null">
AND f.visit_start_time LIKE CONCAT('%', #{parmas.gateName}, '%')
</if>
<if test="parmas.visitEndTime != null">
AND f.visit_end_time LIKE CONCAT('%', #{parmas.gateName}, '%')
</if>
<if test="parmas.gateCategory != null and parmas.gateCategory != ''">
AND g.gate_category = #{parmas.gateCategory}
</if>
</select>
</mapper>