✨ 司机与车辆列表支持按未分配组织筛选
This commit is contained in:
+11
-2
@@ -170,8 +170,17 @@
|
|||||||
AND driver_type = #{driver.driverType}
|
AND driver_type = #{driver.driverType}
|
||||||
</if>
|
</if>
|
||||||
<if test="driver.organizationName != null and driver.organizationName != ''">
|
<if test="driver.organizationName != null and driver.organizationName != ''">
|
||||||
<bind name="organizationNameLike" value="'%' + driver.organizationName + '%'"/>
|
<!-- 哨兵值来自前端 tms-erp-web/src/mixins/organization-search.js 的 UNASSIGNED_ORG_FILTER;
|
||||||
AND organization_name LIKE #{organizationNameLike}
|
改这里必须同步该常量与 TransportVehicleMapper.xml 的同名分支 -->
|
||||||
|
<choose>
|
||||||
|
<when test="'__UNASSIGNED_ORG__'.equals(driver.organizationName)">
|
||||||
|
AND (organization_name IS NULL OR organization_name = '')
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<bind name="organizationNameLike" value="'%' + driver.organizationName + '%'"/>
|
||||||
|
AND organization_name LIKE #{organizationNameLike}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
<if test="driver.status != null">
|
<if test="driver.status != null">
|
||||||
AND status = #{driver.status}
|
AND status = #{driver.status}
|
||||||
|
|||||||
+11
-2
@@ -117,8 +117,17 @@
|
|||||||
<sql id="QueryCondition">
|
<sql id="QueryCondition">
|
||||||
is_deleted = 0
|
is_deleted = 0
|
||||||
<if test="vehicle.organizationName != null and vehicle.organizationName != ''">
|
<if test="vehicle.organizationName != null and vehicle.organizationName != ''">
|
||||||
<bind name="organizationNameLike" value="'%' + vehicle.organizationName + '%'"/>
|
<!-- 哨兵值来自前端 tms-erp-web/src/mixins/organization-search.js 的 UNASSIGNED_ORG_FILTER;
|
||||||
AND organization_name LIKE #{organizationNameLike}
|
改这里必须同步该常量与 DriverMapper.xml 的同名分支 -->
|
||||||
|
<choose>
|
||||||
|
<when test="'__UNASSIGNED_ORG__'.equals(vehicle.organizationName)">
|
||||||
|
AND (organization_name IS NULL OR organization_name = '')
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<bind name="organizationNameLike" value="'%' + vehicle.organizationName + '%'"/>
|
||||||
|
AND organization_name LIKE #{organizationNameLike}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
<if test="vehicle.useDepartment != null and vehicle.useDepartment != ''">
|
<if test="vehicle.useDepartment != null and vehicle.useDepartment != ''">
|
||||||
<bind name="useDepartmentLike" value="'%' + vehicle.useDepartment + '%'"/>
|
<bind name="useDepartmentLike" value="'%' + vehicle.useDepartment + '%'"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user