From 7b9c994a8678e0aaf86638d7426f183ad7a175a5 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期四, 07 八月 2025 10:03:15 +0800
Subject: [PATCH] yys  修改bug 1.“待审核”状态不能进行筛选 2.不能凭供应商名称/合同号进行筛选 3.不能凭供应商名称进行筛选

---
 src/main/resources/mapper/system/SysUserDeptMapper.xml |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/mapper/system/SysUserDeptMapper.xml b/src/main/resources/mapper/system/SysUserDeptMapper.xml
index 898d3d1..81c1365 100644
--- a/src/main/resources/mapper/system/SysUserDeptMapper.xml
+++ b/src/main/resources/mapper/system/SysUserDeptMapper.xml
@@ -4,7 +4,7 @@
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.system.mapper.SysUserDeptMapper">
     
-    <select id="selectUserDeptList" resultType="com.ruoyi.project.system.domain.vo.SysUserDeptVo">
+    <select id="userLoginFacotryList" resultType="com.ruoyi.project.system.domain.vo.SysUserDeptVo">
         SELECT
             T1.user_id,
             T1.dept_id,
@@ -13,11 +13,12 @@
             sys_user_dept T1
         LEFT JOIN sys_dept T2 ON T1.dept_id = T2.dept_id
         <where>
+            T1.dept_id IN (select dept_id from sys_dept where parent_id = 100)
             <if test="userDeptVo.userId != null">
-                T1.user_id = #{userDeptVo.userId}
+                AND T1.user_id = #{userDeptVo.userId}
             </if>
             <if test="userDeptVo.userName != null and userDeptVo.userName != '' ">
-                T1.user_id IN (
+                AND T1.user_id IN (
                 SELECT user_id FROM sys_user WHERE nick_name LIKE CONCAT('%',#{userDeptVo.userName},'%')
                 )
             </if>

--
Gitblit v1.9.3