Commit 736c8cf2 by wuwenlong

sql iplat/eplat to schema

parent 661c0976
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- table information <!-- table information
Generate time : 2024-01-08 18:33:20 Generate time : 2024-01-08 18:33:20
Version : 1.0 Version : 1.0
tableName :eplat.tveci002 tableName :${eplatSchema}.tveci002
RES_ID VARCHAR NOT NULL primarykey, RES_ID VARCHAR NOT NULL primarykey,
RES_CLASS VARCHAR NOT NULL primarykey, RES_CLASS VARCHAR NOT NULL primarykey,
HTML_CODE VARCHAR, HTML_CODE VARCHAR,
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
REC_REVISOR as "recRevisor", <!-- 更新人员 --> REC_REVISOR as "recRevisor", <!-- 更新人员 -->
REC_REVISE_TIME as "recReviseTime", <!-- 更新时间 --> REC_REVISE_TIME as "recReviseTime", <!-- 更新时间 -->
DEPENDENCIES as "dependencies" <!-- js依赖 --> DEPENDENCIES as "dependencies" <!-- js依赖 -->
FROM eplat.tveci002 WHERE 1=1 FROM ${eplatSchema}.tveci002 WHERE 1=1
<isNotEmpty prepend=" AND " property="resId"> <isNotEmpty prepend=" AND " property="resId">
RES_ID = #resId# RES_ID = #resId#
</isNotEmpty> </isNotEmpty>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM eplat.tveci002 WHERE 1=1 SELECT COUNT(*) FROM ${eplatSchema}.tveci002 WHERE 1=1
<isNotEmpty prepend=" AND " property="resId"> <isNotEmpty prepend=" AND " property="resId">
RES_ID = #resId# RES_ID = #resId#
</isNotEmpty> </isNotEmpty>
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
--> -->
<insert id="insert"> <insert id="insert">
INSERT INTO eplat.tveci002 (RES_ID, <!-- 资源ID --> INSERT INTO ${eplatSchema}.tveci002 (RES_ID, <!-- 资源ID -->
RES_CLASS, <!-- 资源类型 --> RES_CLASS, <!-- 资源类型 -->
HTML_CODE, <!-- html代码 --> HTML_CODE, <!-- html代码 -->
CSS_CODE, <!-- 样式代码 --> CSS_CODE, <!-- 样式代码 -->
...@@ -108,13 +108,13 @@ ...@@ -108,13 +108,13 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM eplat.tveci002 WHERE DELETE FROM ${eplatSchema}.tveci002 WHERE
RES_ID = #resId# AND RES_ID = #resId# AND
RES_CLASS = #resClass# RES_CLASS = #resClass#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE eplat.tveci002 UPDATE ${eplatSchema}.tveci002
SET SET
HTML_CODE = #htmlCode#, <!-- html代码 --> HTML_CODE = #htmlCode#, <!-- html代码 -->
CSS_CODE = #cssCode#, <!-- 样式代码 --> CSS_CODE = #cssCode#, <!-- 样式代码 -->
......
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
JOIN ( JOIN (
SELECT SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A FROM ${platSchema}.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID JOIN ${platSchema}.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID JOIN ${platSchema}.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID JOIN ${platSchema}.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup' WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID GROUP BY A.ORG_ID ,C.ORG_ID
) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO ) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO
...@@ -65,10 +65,10 @@ ...@@ -65,10 +65,10 @@
JOIN ( JOIN (
SELECT SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A FROM ${platSchema}.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID JOIN ${platSchema}.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID JOIN ${platSchema}.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID JOIN ${platSchema}.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup' WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID GROUP BY A.ORG_ID ,C.ORG_ID
) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO ) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO
...@@ -105,10 +105,10 @@ ...@@ -105,10 +105,10 @@
JOIN ( JOIN (
SELECT SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A FROM ${platSchema}.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID JOIN ${platSchema}.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID JOIN ${platSchema}.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID JOIN ${platSchema}.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup' WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID GROUP BY A.ORG_ID ,C.ORG_ID
) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO ) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO
...@@ -145,10 +145,10 @@ ...@@ -145,10 +145,10 @@
JOIN ( JOIN (
SELECT SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A FROM ${platSchema}.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID JOIN ${platSchema}.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID JOIN ${platSchema}.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID JOIN ${platSchema}.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup' WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID GROUP BY A.ORG_ID ,C.ORG_ID
) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO ) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO
...@@ -186,10 +186,10 @@ ...@@ -186,10 +186,10 @@
JOIN ( JOIN (
SELECT SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A FROM ${platSchema}.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID JOIN ${platSchema}.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID JOIN ${platSchema}.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID JOIN ${platSchema}.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup' WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID GROUP BY A.ORG_ID ,C.ORG_ID
) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO ) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO
...@@ -242,10 +242,10 @@ ...@@ -242,10 +242,10 @@
JOIN ( JOIN (
SELECT SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A FROM ${platSchema}.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID JOIN ${platSchema}.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID JOIN ${platSchema}.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID JOIN ${platSchema}.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup' WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO ) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...@@ -274,10 +274,10 @@ ...@@ -274,10 +274,10 @@
JOIN ( JOIN (
SELECT SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A FROM ${platSchema}.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID JOIN ${platSchema}.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID JOIN ${platSchema}.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID JOIN ${platSchema}.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup' WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO ) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...@@ -306,10 +306,10 @@ ...@@ -306,10 +306,10 @@
JOIN ( JOIN (
SELECT SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A FROM ${platSchema}.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID JOIN ${platSchema}.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID JOIN ${platSchema}.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID JOIN ${platSchema}.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup' WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO ) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...@@ -348,10 +348,10 @@ ...@@ -348,10 +348,10 @@
JOIN ( JOIN (
SELECT SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A FROM ${platSchema}.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID JOIN ${platSchema}.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID JOIN ${platSchema}.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID JOIN ${platSchema}.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup' WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO ) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...@@ -384,10 +384,10 @@ ...@@ -384,10 +384,10 @@
JOIN ( JOIN (
SELECT SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A FROM ${platSchema}.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID JOIN ${platSchema}.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID JOIN ${platSchema}.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID JOIN ${platSchema}.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup' WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO ) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...@@ -416,10 +416,10 @@ ...@@ -416,10 +416,10 @@
JOIN ( JOIN (
SELECT SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A FROM ${platSchema}.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID JOIN ${platSchema}.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID JOIN ${platSchema}.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID JOIN ${platSchema}.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup' WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO ) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
when c.LOG_VALUE = 6 then '二级报警状态' when c.LOG_VALUE = 6 then '二级报警状态'
else '异常状态' end as STATUS_DESC else '异常状态' end as STATUS_DESC
from ${hpjxSchema}.t_hpsb003 a from ${hpjxSchema}.t_hpsb003 a
join iplat.TXSOG01 b on a.GROUP_CODE = b.ORG_ID and b.IS_DELETED = 0 join ${platSchema}.TXSOG01 b on a.GROUP_CODE = b.ORG_ID and b.IS_DELETED = 0
join ${hpjxSchema}.t_hpsb002 c on a.DEVICE_CODE=c.EQUIPMENT_CODE join ${hpjxSchema}.t_hpsb002 c on a.DEVICE_CODE=c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and c.EQUIPMENT_TYPE = 'STARUS_TYPE' where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and c.EQUIPMENT_TYPE = 'STARUS_TYPE'
and a.COMPANY_CODE = #companyCode# and a.COMPANY_CODE = #companyCode#
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
SELECT SELECT
ITEM_CODE, ITEM_CODE,
ITEM_CNAME ITEM_CNAME
FROM iplat.TEDCM01 FROM ${platSchema}.TEDCM01
WHERE CODESET_CODE = 'hpjx.hpjx.poorType' WHERE CODESET_CODE = 'hpjx.hpjx.poorType'
) B ON A.POOR_TYPE =B.ITEM_CODE ) B ON A.POOR_TYPE =B.ITEM_CODE
WHERE COMPANY_CODE= #companyCode# AND DELETE_FLAG =0 WHERE COMPANY_CODE= #companyCode# AND DELETE_FLAG =0
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
SELECT SELECT
ITEM_CODE, ITEM_CODE,
ITEM_CNAME ITEM_CNAME
FROM iplat.TEDCM01 FROM ${platSchema}.TEDCM01
WHERE CODESET_CODE = 'hpjx.hpjx.poorType' WHERE CODESET_CODE = 'hpjx.hpjx.poorType'
) B ON A.POOR_TYPE =B.ITEM_CODE ) B ON A.POOR_TYPE =B.ITEM_CODE
WHERE COMPANY_CODE= #companyCode# AND STATUS=#status# AND DELETE_FLAG =0 WHERE COMPANY_CODE= #companyCode# AND STATUS=#status# AND DELETE_FLAG =0
......
...@@ -87,9 +87,9 @@ ...@@ -87,9 +87,9 @@
else 4 end as SORT, else 4 end as SORT,
1 as SORT1 1 as SORT1
from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a from ${platSchema}.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID join ${platSchema}.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID join ${platSchema}.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a
left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.REGISTER_DATE = #date# and b.FACTORY_CODE = #factorycode# and b.DELETE_FLAG = 0 left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.REGISTER_DATE = #date# and b.FACTORY_CODE = #factorycode# and b.DELETE_FLAG = 0
group by a.GROUP_NAME,b.GROUP_TYPE group by a.GROUP_NAME,b.GROUP_TYPE
...@@ -104,9 +104,9 @@ ...@@ -104,9 +104,9 @@
else 4 end as SORT, else 4 end as SORT,
2 as SORT1 2 as SORT1
from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a from ${platSchema}.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID join ${platSchema}.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID join ${platSchema}.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a
left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.REGISTER_DATE = #date# and b.FACTORY_CODE = #factorycode# and b.DELETE_FLAG = 0 left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.REGISTER_DATE = #date# and b.FACTORY_CODE = #factorycode# and b.DELETE_FLAG = 0
group by a.GROUP_NAME,b.GROUP_TYPE group by a.GROUP_NAME,b.GROUP_TYPE
...@@ -121,9 +121,9 @@ ...@@ -121,9 +121,9 @@
else 4 end as SORT, else 4 end as SORT,
3 as SORT1 3 as SORT1
from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a from ${platSchema}.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID join ${platSchema}.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID join ${platSchema}.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a
left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.REGISTER_DATE = #date# and b.FACTORY_CODE = #factorycode# and b.DELETE_FLAG = 0 left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.REGISTER_DATE = #date# and b.FACTORY_CODE = #factorycode# and b.DELETE_FLAG = 0
group by a.GROUP_NAME) a group by a.GROUP_NAME) a
...@@ -134,9 +134,9 @@ ...@@ -134,9 +134,9 @@
select a.GROUP_NAME,ifnull(GROUP_CONCAT(distinct PRDT_NAME SEPARATOR ','),'') as PART_NAME select a.GROUP_NAME,ifnull(GROUP_CONCAT(distinct PRDT_NAME SEPARATOR ','),'') as PART_NAME
from ( from (
select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a from ${platSchema}.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID join ${platSchema}.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID join ${platSchema}.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a
left join ${hpjxSchema}.t_hpsc009 b on a.GROUP_CODE = b.GROUP_CODE and b.REGISTER_DATE = #date# and b.DELETE_FLAG = 0 left join ${hpjxSchema}.t_hpsc009 b on a.GROUP_CODE = b.GROUP_CODE and b.REGISTER_DATE = #date# and b.DELETE_FLAG = 0
where a.COMPANY_CODE = #companyCode# and a.FACTORY_CODE = #factorycode# where a.COMPANY_CODE = #companyCode# and a.FACTORY_CODE = #factorycode#
...@@ -157,9 +157,9 @@ ...@@ -157,9 +157,9 @@
when right(a.GROUP_NAME,2) = '三组' then 3 when right(a.GROUP_NAME,2) = '三组' then 3
else 4 end as SORT else 4 end as SORT
from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a from ${platSchema}.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID join ${platSchema}.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID join ${platSchema}.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a
left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0 left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0
and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 6 day),'-','') and b.FACTORY_CODE = #factorycode# and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 6 day),'-','') and b.FACTORY_CODE = #factorycode#
...@@ -175,9 +175,9 @@ ...@@ -175,9 +175,9 @@
when right(a.GROUP_NAME,2) = '三组' then 3 when right(a.GROUP_NAME,2) = '三组' then 3
else 4 end as SORT else 4 end as SORT
from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a from ${platSchema}.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID join ${platSchema}.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID join ${platSchema}.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a
left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0 left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0
and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 5 day),'-','') and b.FACTORY_CODE = #factorycode# and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 5 day),'-','') and b.FACTORY_CODE = #factorycode#
...@@ -193,9 +193,9 @@ ...@@ -193,9 +193,9 @@
when right(a.GROUP_NAME,2) = '三组' then 3 when right(a.GROUP_NAME,2) = '三组' then 3
else 4 end as SORT else 4 end as SORT
from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a from ${platSchema}.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID join ${platSchema}.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID join ${platSchema}.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a
left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0 left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0
and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 4 day),'-','') and b.FACTORY_CODE = #factorycode# and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 4 day),'-','') and b.FACTORY_CODE = #factorycode#
...@@ -211,9 +211,9 @@ ...@@ -211,9 +211,9 @@
when right(a.GROUP_NAME,2) = '三组' then 3 when right(a.GROUP_NAME,2) = '三组' then 3
else 4 end as SORT else 4 end as SORT
from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a from ${platSchema}.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID join ${platSchema}.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID join ${platSchema}.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a
left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0 left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0
and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 3 day),'-','') and b.FACTORY_CODE = #factorycode# and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 3 day),'-','') and b.FACTORY_CODE = #factorycode#
...@@ -229,9 +229,9 @@ ...@@ -229,9 +229,9 @@
when right(a.GROUP_NAME,2) = '三组' then 3 when right(a.GROUP_NAME,2) = '三组' then 3
else 4 end as SORT else 4 end as SORT
from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a from ${platSchema}.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID join ${platSchema}.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID join ${platSchema}.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a
left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0 left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0
and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 2 day),'-','') and b.FACTORY_CODE = #factorycode# and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 2 day),'-','') and b.FACTORY_CODE = #factorycode#
...@@ -247,9 +247,9 @@ ...@@ -247,9 +247,9 @@
when right(a.GROUP_NAME,2) = '三组' then 3 when right(a.GROUP_NAME,2) = '三组' then 3
else 4 end as SORT else 4 end as SORT
from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a from ${platSchema}.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID join ${platSchema}.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID join ${platSchema}.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode#and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode#and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a
left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0 left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0
and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 1 day),'-','') and b.FACTORY_CODE = #factorycode# and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 1 day),'-','') and b.FACTORY_CODE = #factorycode#
...@@ -265,9 +265,9 @@ ...@@ -265,9 +265,9 @@
when right(a.GROUP_NAME,2) = '三组' then 3 when right(a.GROUP_NAME,2) = '三组' then 3
else 4 end as SORT else 4 end as SORT
from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a from ${platSchema}.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID join ${platSchema}.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID join ${platSchema}.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode# and c.ORG_ID <![CDATA[ <> ]]> 'R24050801') a
left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0 left join ${hpjxSchema}.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0
and b.REGISTER_DATE = #date# and b.FACTORY_CODE = #factorycode# and b.REGISTER_DATE = #date# and b.FACTORY_CODE = #factorycode#
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
<select id="queryPmCompanyInfo" resultClass="java.util.HashMap"> <select id="queryPmCompanyInfo" resultClass="java.util.HashMap">
select ORG_ID,ORG_CNAME select ORG_ID,ORG_CNAME
from iplat.TXSOG01 from ${platSchema}.TXSOG01
where ORG_TYPE = 'factory' and COMPANY_CODE = #companyCode# and IS_DELETED = 0 where ORG_TYPE = 'factory' and COMPANY_CODE = #companyCode# and IS_DELETED = 0
</select> </select>
......
...@@ -469,7 +469,7 @@ ...@@ -469,7 +469,7 @@
when ITEM_CODE in ('4') then '4' when ITEM_CODE in ('4') then '4'
else '0' end "param1Field" else '0' end "param1Field"
from from
iplat.tedcm01 ${platSchema}.tedcm01
where STATUS = '1' and CODESET_CODE = 'hpjx.hpkc.inventType' where STATUS = '1' and CODESET_CODE = 'hpjx.hpkc.inventType'
<isNotEmpty prepend=" AND " property="itemCode"> <isNotEmpty prepend=" AND " property="itemCode">
$itemCode$ $itemCode$
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
ORG_CNAME AS "groupName", ORG_CNAME AS "groupName",
FACTORY_CODE AS "factoryCode", FACTORY_CODE AS "factoryCode",
FACTORY_NAME AS "factoryName" FACTORY_NAME AS "factoryName"
FROM iplat.TXSOG01 FROM ${platSchema}.TXSOG01
WHERE 1 = 1 AND IS_DELETED = 0 WHERE 1 = 1 AND IS_DELETED = 0
AND FACTORY_CODE IN ( AND FACTORY_CODE IN (
SELECT ORG_ENAME FROM iplat.TXSOG01 SELECT ORG_ENAME FROM ${platSchema}.TXSOG01
WHERE COMPANY_CODE = #companyCode# AND ORG_TYPE = 'factory' WHERE COMPANY_CODE = #companyCode# AND ORG_TYPE = 'factory'
) )
<isNotEmpty prepend=" AND " property="orgType"> <isNotEmpty prepend=" AND " property="orgType">
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT SELECT
COUNT(*) COUNT(*)
FROM iplat.TXSOG01 FROM ${platSchema}.TXSOG01
WHERE 1 = 1 WHERE 1 = 1
AND FACTORY_CODE IN ( AND FACTORY_CODE IN (
SELECT ORG_ENAME FROM iplat.TXSOG01 SELECT ORG_ENAME FROM ${platSchema}.TXSOG01
WHERE COMPANY_CODE = #companyCode# AND ORG_TYPE = 'factory' WHERE COMPANY_CODE = #companyCode# AND ORG_TYPE = 'factory'
) )
<isNotEmpty prepend=" AND " property="orgType"> <isNotEmpty prepend=" AND " property="orgType">
......
...@@ -191,9 +191,9 @@ ...@@ -191,9 +191,9 @@
<select id="queryUserId" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryUserId" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select b.USER_ID as "userId",b.USER_NAME as "userName" select b.USER_ID as "userId",b.USER_NAME as "userName"
from iplat.txsog02 a from ${platSchema}.txsog02 a
join iplat.xs_user b on a.USER_ID=b.USER_ID join ${platSchema}.xs_user b on a.USER_ID=b.USER_ID
join iplat.txsog01 c on c.ORG_ID = a.ORG_ID and c.IS_DELETED = 0 join ${platSchema}.txsog01 c on c.ORG_ID = a.ORG_ID and c.IS_DELETED = 0
where 1=1 where 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
c.COMPANY_CODE = #companyCode# c.COMPANY_CODE = #companyCode#
...@@ -208,9 +208,9 @@ ...@@ -208,9 +208,9 @@
<select id="getFactoryCode" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="getFactoryCode" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select distinct c.FACTORY_CODE as "factoryCode" select distinct c.FACTORY_CODE as "factoryCode"
from iplat.txsog02 a from ${platSchema}.txsog02 a
join iplat.xs_user b on a.USER_ID=b.USER_ID join ${platSchema}.xs_user b on a.USER_ID=b.USER_ID
join iplat.txsog01 c on c.ORG_ID = a.ORG_ID and c.IS_DELETED = 0 join ${platSchema}.txsog01 c on c.ORG_ID = a.ORG_ID and c.IS_DELETED = 0
where 1=1 where 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
c.COMPANY_CODE = #companyCode# c.COMPANY_CODE = #companyCode#
......
...@@ -205,9 +205,9 @@ ...@@ -205,9 +205,9 @@
<select id="queryAppGroup" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryAppGroup" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select c.ORG_ID as "groupCode",c.ORG_CNAME as "groupName",c.FACTORY_CODE as "factoryCode" select c.ORG_ID as "groupCode",c.ORG_CNAME as "groupName",c.FACTORY_CODE as "factoryCode"
from iplat.txsog02 a from ${platSchema}.txsog02 a
join iplat.xs_user b on a.USER_ID=b.USER_ID join ${platSchema}.xs_user b on a.USER_ID=b.USER_ID
join iplat.txsog01 c on c.ORG_ID = a.ORG_ID and c.IS_DELETED = 0 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 1=1 and c.ORG_TYPE = 'prodGroup'
<isNotEmpty prepend=" AND " property="userId"> <isNotEmpty prepend=" AND " property="userId">
b.USER_ID = #userId# b.USER_ID = #userId#
...@@ -221,11 +221,11 @@ ...@@ -221,11 +221,11 @@
A.ORG_CNAME AS "groupName", A.ORG_CNAME AS "groupName",
A.PARENT_ORG_ID AS "factoryCode", A.PARENT_ORG_ID AS "factoryCode",
B.ORG_CNAME AS "factoryName" B.ORG_CNAME AS "factoryName"
FROM iplat.TXSOG01 A LEFT JOIN ( FROM ${platSchema}.TXSOG01 A LEFT JOIN (
SELECT SELECT
ORG_ENAME, ORG_ENAME,
ORG_CNAME ORG_CNAME
FROM iplat.TXSOG01 WHERE COMPANY_CODE=#companyCode# FROM ${platSchema}.TXSOG01 WHERE COMPANY_CODE=#companyCode#
) B ON A.PARENT_ORG_ID=B.ORG_ENAME ) B ON A.PARENT_ORG_ID=B.ORG_ENAME
WHERE A.ORG_TYPE = 'prodGroup' AND A.COMPANY_CODE=#companyCode# WHERE A.ORG_TYPE = 'prodGroup' AND A.COMPANY_CODE=#companyCode#
<isNotEmpty prepend=" AND " property="factoryCode"> <isNotEmpty prepend=" AND " property="factoryCode">
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
SELECT SELECT
ITEM_CODE AS "itemCode", ITEM_CODE AS "itemCode",
ITEM_CNAME AS "itemCname" ITEM_CNAME AS "itemCname"
FROM iplat.TEDCM01 FROM ${platSchema}.TEDCM01
WHERE CODESET_CODE = 'hpjx.hpjx.poorType' WHERE CODESET_CODE = 'hpjx.hpjx.poorType'
</select> </select>
......
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