Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hp-smart
Commits
50ad3625
Commit
50ad3625
authored
Jul 06, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql iplat/eplat to schema
parent
736c8cf2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
55 deletions
+55
-55
HPBI001.xml
src/main/java/com/baosight/hpjx/hp/bi/sql/HPBI001.xml
+37
-37
HPMT001.xml
src/main/java/com/baosight/hpjx/hp/mt/sql/HPMT001.xml
+2
-2
HPMT002.xml
src/main/java/com/baosight/hpjx/hp/mt/sql/HPMT002.xml
+3
-3
HPSB003.xml
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB003.xml
+4
-4
HPSC002.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002.xml
+1
-1
HPSC010.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC010.xml
+5
-5
HPXSOrg.xml
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXSOrg.xml
+3
-3
No files found.
src/main/java/com/baosight/hpjx/hp/bi/sql/HPBI001.xml
View file @
50ad3625
...
...
@@ -448,10 +448,10 @@
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM
iplat
.TXSOG01 A
JOIN
iplat
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
iplat
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
iplat
.XS_USER D ON C.USER_ID = D.USER_ID
FROM
${platSchema}
.TXSOG01 A
JOIN
${platSchema}
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
${platSchema}
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
${platSchema}
.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...
...
@@ -490,10 +490,10 @@
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM
iplat
.TXSOG01 A
JOIN
iplat
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
iplat
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
iplat
.XS_USER D ON C.USER_ID = D.USER_ID
FROM
${platSchema}
.TXSOG01 A
JOIN
${platSchema}
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
${platSchema}
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
${platSchema}
.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...
...
@@ -526,10 +526,10 @@
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM
iplat
.TXSOG01 A
JOIN
iplat
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
iplat
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
iplat
.XS_USER D ON C.USER_ID = D.USER_ID
FROM
${platSchema}
.TXSOG01 A
JOIN
${platSchema}
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
${platSchema}
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
${platSchema}
.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...
...
@@ -558,10 +558,10 @@
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM
iplat
.TXSOG01 A
JOIN
iplat
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
iplat
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
iplat
.XS_USER D ON C.USER_ID = D.USER_ID
FROM
${platSchema}
.TXSOG01 A
JOIN
${platSchema}
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
${platSchema}
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
${platSchema}
.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...
...
@@ -590,10 +590,10 @@
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM
iplat
.TXSOG01 A
JOIN
iplat
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
iplat
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
iplat
.XS_USER D ON C.USER_ID = D.USER_ID
FROM
${platSchema}
.TXSOG01 A
JOIN
${platSchema}
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
${platSchema}
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
${platSchema}
.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...
...
@@ -632,10 +632,10 @@
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM
iplat
.TXSOG01 A
JOIN
iplat
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
iplat
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
iplat
.XS_USER D ON C.USER_ID = D.USER_ID
FROM
${platSchema}
.TXSOG01 A
JOIN
${platSchema}
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
${platSchema}
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
${platSchema}
.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...
...
@@ -679,10 +679,10 @@
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM
iplat
.TXSOG01 A
JOIN
iplat
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
iplat
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
iplat
.XS_USER D ON C.USER_ID = D.USER_ID
FROM
${platSchema}
.TXSOG01 A
JOIN
${platSchema}
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
${platSchema}
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
${platSchema}
.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...
...
@@ -718,10 +718,10 @@
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM
iplat
.TXSOG01 A
JOIN
iplat
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
iplat
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
iplat
.XS_USER D ON C.USER_ID = D.USER_ID
FROM
${platSchema}
.TXSOG01 A
JOIN
${platSchema}
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
${platSchema}
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
${platSchema}
.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...
...
@@ -757,10 +757,10 @@
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM
iplat
.TXSOG01 A
JOIN
iplat
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
iplat
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
iplat
.XS_USER D ON C.USER_ID = D.USER_ID
FROM
${platSchema}
.TXSOG01 A
JOIN
${platSchema}
.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN
${platSchema}
.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN
${platSchema}
.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
...
...
@@ -774,7 +774,7 @@
<select
id=
"queryCompanyCode"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select COMPANY_CODE from
iplat
.XS_USER where 1=1
select COMPANY_CODE from
${platSchema}
.XS_USER where 1=1
<isNotEmpty
prepend=
" AND "
property=
"loginName"
>
LOGIN_NAME = #loginName#
</isNotEmpty>
...
...
src/main/java/com/baosight/hpjx/hp/mt/sql/HPMT001.xml
View file @
50ad3625
...
...
@@ -46,7 +46,7 @@
SELECT
ORG_ID AS "orgId",
ORG_CNAME AS "orgCname"
FROM
iplat
.TXSOG01
FROM
${platSchema}
.TXSOG01
WHERE 1=1
AND ORG_TYPE = 'factory' AND COMPANY_CODE = #companyCode#
AND IS_DELETED=0
...
...
@@ -71,7 +71,7 @@
SELECT
ORG_ID AS "orgId",
ORG_CNAME AS "orgCname"
FROM
iplat
.TXSOG01
FROM
${platSchema}
.TXSOG01
WHERE 1=1
AND ORG_TYPE = 'factory' AND COMPANY_CODE = #companyCode#
AND IS_DELETED=0
...
...
src/main/java/com/baosight/hpjx/hp/mt/sql/HPMT002.xml
View file @
50ad3625
...
...
@@ -189,7 +189,7 @@
SELECT
ITEM_CODE,
ITEM_CNAME
FROM
iplat
.TEDCM01
FROM
${platSchema}
.TEDCM01
WHERE CODESET_CODE = 'hpjx.hpjx.poorType'
) B ON A.POOR_TYPE =B.ITEM_CODE
WHERE COMPANY_CODE= #companyCode#
...
...
@@ -233,7 +233,7 @@
<select
id=
"queryFile"
resultClass=
"java.util.HashMap"
>
SELECT URL FROM
iplat
.TEUDM05 where RES_ID=#docId#
SELECT URL FROM
${platSchema}
.TEUDM05 where RES_ID=#docId#
</select>
...
...
@@ -351,7 +351,7 @@
<select
id=
"queryFvalue"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT FVALUE AS "fvalue" FROM
iplat
.TEDCC03 WHERE FKEY='docRootDir'
SELECT DISTINCT FVALUE AS "fvalue" FROM
${platSchema}
.TEDCC03 WHERE FKEY='docRootDir'
</select>
<select
id=
"pmBannerList"
resultClass=
"java.util.HashMap"
>
...
...
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB003.xml
View file @
50ad3625
...
...
@@ -355,7 +355,7 @@
</isNotEmpty>-->
<!--<isNotEmpty prepend="and" property="companyCode">
ORG_ID in (
select ORG_ID FROM
iplat
.txsog01
select ORG_ID FROM
${platSchema}
.txsog01
WHERE IS_DELETED = '0'
and COMPANY_CODE = #companyCode#
<isNotEmpty prepend="and" property="orgEname">
...
...
@@ -363,11 +363,11 @@
</isNotEmpty>
AND ORG_TYPE NOT IN ('factory','dept')
and FACTORY_CODE IN (
SELECT FACTORY_CODE FROM
iplat
.txsog01
SELECT FACTORY_CODE FROM
${platSchema}
.txsog01
WHERE IS_DELETED = '0' and COMPANY_CODE = #companyCode#
and ORG_ID IN (
SELECT ORG_ID FROM
iplat
.txsog02 T2
INNER JOIN
iplat
.xs_user xu ON t2.USER_ID = xu.USER_ID
SELECT ORG_ID FROM
${platSchema}
.txsog02 T2
INNER JOIN
${platSchema}
.xs_user xu ON t2.USER_ID = xu.USER_ID
WHERE xu.COMPANY_CODE = #companyCode#
ORDER BY T2.REC_CREATE_TIME desc
)
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002.xml
View file @
50ad3625
...
...
@@ -538,7 +538,7 @@
when ITEM_CODE in ('4') then '4'
else '0' end "param1Field"
from
iplat
.tedcm01
${platSchema}
.tedcm01
where STATUS = '1' and CODESET_CODE = 'hpjx.hpkc.inventType'
<isNotEmpty
prepend=
" AND "
property=
"itemCode"
>
$itemCode$
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC010.xml
View file @
50ad3625
...
...
@@ -235,7 +235,7 @@
ORG_ENAME AS "groupCode",
ORG_TYPE AS "orgType",
FACTORY_CODE as "factoryCode"
FROM
iplat
.txsog01
FROM
${platSchema}
.txsog01
WHERE IS_DELETED = '0'
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
...
...
@@ -248,11 +248,11 @@
</isEmpty>
<isNotEmpty
prepend=
" AND "
property=
"loginName"
>
FACTORY_CODE IN (
SELECT FACTORY_CODE FROM
iplat
.txsog01
SELECT FACTORY_CODE FROM
${platSchema}
.txsog01
WHERE IS_DELETED = '0' and COMPANY_CODE = #companyCode#
and ORG_ID = (
select ORG_ID from
iplat
.txsog02 T2
INNER JOIN
iplat
.xs_user xu ON t2.USER_ID = xu.USER_ID
select ORG_ID from
${platSchema}
.txsog02 T2
INNER JOIN
${platSchema}
.xs_user xu ON t2.USER_ID = xu.USER_ID
where xu.LOGIN_NAME = #loginName#
order by T2.REC_CREATE_TIME desc
limit 1
...
...
@@ -273,7 +273,7 @@
select
ITEM_CODE as "groupType"
FROM
iplat
.tedcm01
${platSchema}
.tedcm01
where STATUS = '1' and CODESET_CODE = 'hpjx.hpjx.productionType'
<isNotEmpty
prepend=
" AND "
property=
"itemCode"
>
$itemCode$
...
...
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXSOrg.xml
View file @
50ad3625
...
...
@@ -106,16 +106,16 @@
FROM (
SELECT
@CODES as CODES,
(SELECT @CODES:=GROUP_CONCAT(PARENT_ORG_ID) FROM
IPLAT
.TXSOG01 WHERE FIND_IN_SET(ORG_ID, @CODES)
(SELECT @CODES:=GROUP_CONCAT(PARENT_ORG_ID) FROM
${platSchema}
.TXSOG01 WHERE FIND_IN_SET(ORG_ID, @CODES)
AND COMPANY_CODE = #companyCode#
AND IS_DELETED = 0
) as T1,
@LEVEL:=@LEVEL+1 as level
FROM
IPLAT
.TXSOG01,
FROM
${platSchema}
.TXSOG01,
(select @CODES:=#orgId#, @LEVEL:= 0) T4
where @CODES is not null
) T2,
IPLAT
.TXSOG01 T3
${platSchema}
.TXSOG01 T3
WHERE 1=1
AND FIND_IN_SET(T3.ORG_ID, T2.CODES)
<isNotEmpty
prepend=
" AND "
property=
"orgType"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment