Commit 4f1b8139 by wuwenlong

组织机构过滤已删除的数据bugfix

parent 36762c5d
......@@ -98,7 +98,7 @@
) T2,
${platSchema}.TXSOG01 T3
LEFT JOIN ${platSchema}.TXSOG01 T5 ON T3.FACTORY_CODE = T5.ORG_ID
WHERE 1=1
WHERE T3.IS_DELETED = 0
AND FIND_IN_SET(T3.ORG_ID, T2.CODES)
AND T3.ORG_ID != 'root'
<isNotEmpty prepend=" AND " property="orgType">
......@@ -125,7 +125,7 @@
where @CODES is not null
) T2,
${platSchema}.TXSOG01 T3
WHERE 1=1
WHERE T3.IS_DELETED = 0
AND FIND_IN_SET(T3.ORG_ID, T2.CODES)
<isNotEmpty prepend=" AND " property="orgType">
ORG_TYPE = #orgType#
......@@ -143,7 +143,7 @@
ORG_ID as "orgId",
ORG_CNAME as "orgCname"
FROM ${platSchema}.TXSOG01
WHERE 1=1
WHERE T3.IS_DELETED = 0
AND ORG_TYPE != 'org'
<include refid="condition"/>
<include refid="customCondition"/>
......@@ -191,7 +191,7 @@
) T2,
${platSchema}.TXSOG01 T3
LEFT JOIN ${platSchema}.TXSOG01 T5 ON T3.FACTORY_CODE = T5.ORG_ID
WHERE 1=1
WHERE T3.IS_DELETED = 0
AND FIND_IN_SET(T3.ORG_ID, T2.CODES)
AND T3.ORG_TYPE IN ('prodGroup', 'cutGroup')
<isNotEmpty prepend=" AND " property="orgType">
......@@ -205,7 +205,7 @@
from ${platSchema}.txsog02 a
join ${platSchema}.xs_user b on a.USER_ID=b.USER_ID
join ${platSchema}.txsog01 c on c.ORG_ID = a.ORG_ID and c.IS_DELETED = 0
where 1=1 and c.ORG_TYPE = 'prodGroup'
where c.IS_DELETED = 0 and c.ORG_TYPE = 'prodGroup'
<isNotEmpty prepend=" AND " property="userId">
b.USER_ID = #userId#
</isNotEmpty>
......@@ -234,7 +234,7 @@
A.COMPANY_NAME AS "companyName",
A.PARENT_ORG_ID as "parentOrgId"
FROM ${platSchema}.TXSOG01 A, ${platSchema}.TXSOG02 B, ${platSchema}.XS_USER C
WHERE 1=1
WHERE A.IS_DELETED = 0
AND A.ORG_ID = B.ORG_ID
AND B.USER_ID = C.USER_ID
AND C.LOGIN_NAME = #loginName#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment