Ver Fonte

履职内容库定义机构查询问题

jiawuxian há 2 anos atrás
pai
commit
f5b4d82f1b

+ 6 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/resumption/AppRuleMapper.xml

@@ -26,6 +26,10 @@
             <if test="appRule.checkSub==false">
                 and a.org_id=#{appRule.orgId}
             </if>
+            <if test="appRule.checkSub==true">
+                and a.org_id in (select id from sys_org where `path` like concat((select `path` from sys_org where id =
+                #{appRule.orgId}),'%'))
+            </if>
         </where>
         order by a.create_time desc
     </select>
@@ -37,7 +41,8 @@
                r.org_type as orgTypeId
         from core_resumption_rule r
                  inner join sys_dict_data d on r.type = d.id and d.dict_code = 'sys_org_type'
-        where status = "0" and r.deleted=0
+        where status = "0"
+          and r.deleted = 0
     </select>
 
     <!--    <select id="get" resultType="com.xunmei.core.resumption.vo.appRule.AppRuleInfoVo">-->