选择车队不一致修改

This commit is contained in:
秦鸿展
2026-01-19 15:32:00 +08:00
parent ff334b155c
commit 7f8732dd02
8 changed files with 127 additions and 118 deletions
@@ -8,36 +8,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectServiceItemsManagePo1">
<where>
<!-- 删除标记:0-无状态,1-正常,2-已删除,查询时只查询正常的数据 -->
<choose>
<when test="delFlag != null">
and del_flag = #{delFlag}
</when>
<otherwise>
and del_flag = 1
</otherwise>
</choose>
<if test="createByName != null and createByName != ''">
and create_by_name like concat('%', #{createByName}, '%')
</if>
<if test="updateByName != null and updateByName != ''">
and update_by_name like concat('%', #{updateByName}, '%')
</if>
<!-- &lt;!&ndash; 删除标记:0-无状态,1-正常,2-已删除,查询时只查询正常的数据 &ndash;&gt;-->
<!-- <choose>-->
<!-- <when test="delFlag != null">-->
<!-- and del_flag = #{delFlag}-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- and del_flag = 1-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- <if test="createByName != null and createByName != ''">-->
<!-- and create_by_name like concat('%', #{createByName}, '%')-->
<!-- </if>-->
<!-- <if test="updateByName != null and updateByName != ''">-->
<!-- and update_by_name like concat('%', #{updateByName}, '%')-->
<!-- </if>-->
<!-- 数据权限:南光组织(organizationId=2827)查全部,其他组织查自己 -->
<!-- 如果 organizationId 和 topOrganizationId 都为 null,表示查询所有组织的数据(不添加组织过滤条件) -->
<if test="organizationId != null">
<!-- 如果设置了 organizationId,添加 organization_id 条件 -->
and organization_id = #{organizationId}
and organization_name IS NOT NULL
and organization_name != ''
and LENGTH(TRIM(organization_name)) > 0
-- and organization_name IS NOT NULL
-- and organization_name != ''
-- and LENGTH(TRIM(organization_name)) > 0
</if>
<if test="topOrganizationId != null and organizationId == null">
<!-- 如果设置了 topOrganizationId 但没有设置 organizationId,添加 top_organization_id 条件 -->
and top_organization_id = #{topOrganizationId}
and organization_name IS NOT NULL
and organization_name != ''
and LENGTH(TRIM(organization_name)) > 0
-- and organization_name IS NOT NULL
-- and organization_name != ''
-- and LENGTH(TRIM(organization_name)) > 0
</if>
<if test="organizationName != null and organizationName != ''">
and organization_name like concat('%', #{organizationName}, '%')