🔀 合并票 06 后端未分配组织筛选
This commit is contained in:
+11
-2
@@ -170,8 +170,17 @@
|
||||
AND driver_type = #{driver.driverType}
|
||||
</if>
|
||||
<if test="driver.organizationName != null and driver.organizationName != ''">
|
||||
<bind name="organizationNameLike" value="'%' + driver.organizationName + '%'"/>
|
||||
AND organization_name LIKE #{organizationNameLike}
|
||||
<!-- 哨兵值来自前端 tms-erp-web/src/mixins/organization-search.js 的 UNASSIGNED_ORG_FILTER;
|
||||
改这里必须同步该常量与 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 test="driver.status != null">
|
||||
AND status = #{driver.status}
|
||||
|
||||
+11
-2
@@ -117,8 +117,17 @@
|
||||
<sql id="QueryCondition">
|
||||
is_deleted = 0
|
||||
<if test="vehicle.organizationName != null and vehicle.organizationName != ''">
|
||||
<bind name="organizationNameLike" value="'%' + vehicle.organizationName + '%'"/>
|
||||
AND organization_name LIKE #{organizationNameLike}
|
||||
<!-- 哨兵值来自前端 tms-erp-web/src/mixins/organization-search.js 的 UNASSIGNED_ORG_FILTER;
|
||||
改这里必须同步该常量与 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 test="vehicle.useDepartment != null and vehicle.useDepartment != ''">
|
||||
<bind name="useDepartmentLike" value="'%' + vehicle.useDepartment + '%'"/>
|
||||
|
||||
Reference in New Issue
Block a user