Explorar o código

部门默认审核人-电源中心

梁世豪 hai 5 meses
pai
achega
88e2ab0d40

+ 5 - 1
src/main/java/com/liang/controller/SysUserPostController.java

@@ -138,7 +138,11 @@ public class SysUserPostController extends BaseController {
138 138
         paraMap.put("postId", postId.toString());
139 139
         paraMap.put("userName", userName);
140 140
         paraMap.put("postName",postName);
141
-        paraMap.put("deptName", String.valueOf(userInfo.getDeptName()));
141
+        String deptName = userInfo.getDeptName();
142
+        if(deptName.contains("电源")){
143
+            deptName = null;
144
+        }
145
+        paraMap.put("deptName", deptName);
142 146
         List<SysUserPost> list = sysUserPostService.getPostUserList(paraMap);
143 147
         List<SysUserPost> list_power = new ArrayList<>();
144 148
 //如果是电源相关部门就只传一个李华

+ 2 - 2
src/main/resources/mapper/SysUserPostDao.xml

@@ -165,8 +165,8 @@
165 165
         <if test="userName!= null and userName!= ''">
166 166
             and u.name like '%'+#{userName}+'%'
167 167
         </if>
168
-        <if test="postId ==28">
169
-            and sdi.dept_name = #{deptName}
168
+        <if test="postId == 28 and deptName!= null">
169
+                    and sdi.dept_name = #{deptName}
170 170
         </if>
171 171
             ORDER BY u.order_code DESC
172 172
     </select>