From 2cef955017c735c2828e69f878d3d6b44200074f Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期二, 22 八月 2023 16:54:57 +0800 Subject: [PATCH] 111 --- server/src/main/resources/mappers/WorkorderExtMapper.xml | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/resources/mappers/WorkorderExtMapper.xml b/server/src/main/resources/mappers/WorkorderExtMapper.xml index 8ddc14a..a2cc437 100644 --- a/server/src/main/resources/mappers/WorkorderExtMapper.xml +++ b/server/src/main/resources/mappers/WorkorderExtMapper.xml @@ -944,8 +944,8 @@ <choose> <when test="departIds != null and departIds.size()>0"> AND ( `a`.`CREATE_USER` = #{createUser} or - exists (select d.id from workorder_user d where d.WORKORDER_ID=a.id and d.DELETED=0 and d.PRO_USER_ID=#{createUser} ) - or exists (select d.id from company_user d where d.user_id= a.CREATE_USER and d.department_id + exists ( select d.id from workorder_user d where d.WORKORDER_ID=a.id and d.DELETED=0 and d.PRO_USER_ID=#{createUser} ) + or exists ( select d.id from company_user d where d.user_id= a.CREATE_USER and d.department_id in <foreach collection="departIds" item="item" separator="," open="(" close=")">#{item}</foreach>) or exists (select d.id from workorder_user wu left join company_user d on wu.PRO_USER_ID=d.USER_ID and d.DELETED=0 where wu.WORKORDER_ID= a.id and d.department_id in <foreach collection="departIds" item="item" separator="," open="(" close=")">#{item}</foreach>) -- Gitblit v1.9.3