Преглед изворни кода

Merge branch 'master' of http://112.172.147.34:4936/style24/style24.doc.git

eskim пре 5 година
родитељ
комит
6e1da8e260

+ 23 - 0
산출물/3.설계/05.DB-Object/06.DDL/table.sql

@@ -10793,6 +10793,7 @@ CREATE TABLE TB_ORDER_CHANGE (
   CHG_REASON         VARCHAR(20)   NOT NULL COMMENT '변경사유(공통코드 - 취소:G686, 반품:G688, 교환:G689)', -- 변경사유
   CHG_MEMO           VARCHAR(1000) NULL     COMMENT '변경메모', -- 변경메모
   WD_GB              VARCHAR(1)    NULL     COMMENT '회수구분', -- 회수구분
+  WD_TARGET_YN       CHAR(1)       NULL     DEFAULT 'Y' COMMENT '회수지시대상여부', -- 회수지시대상여부
   CHGER_NM           VARCHAR(50)   NULL     COMMENT '변경자명', -- 변경자명
   CHGER_PHNNO        VARCHAR(20)   NULL     COMMENT '변경자휴대전화번호', -- 변경자휴대전화번호
   CHGER_TELNO        VARCHAR(20)   NULL     COMMENT '변경자전화번호', -- 변경자전화번호
@@ -10813,6 +10814,7 @@ CREATE TABLE TB_ORDER_CHANGE (
   WD_REASON_CD       VARCHAR(20)   NULL     COMMENT '미회수사유코드(공통코드G321,G322)', -- 미회수사유코드(공통코드G321,G322)
   WD_STATE_DT        TIMESTAMP     NULL     COMMENT '회수상태수정일시', -- 회수상태수정일시
   WD_BF_SEND_YN      CHAR(1)       NOT NULL DEFAULT 'N' COMMENT '선발송여부', -- 선발송여부
+  DISP_YN            CHAR(1)       NOT NULL DEFAULT 'Y' COMMENT '표시여부', -- 표시여부
   REG_NO             INT UNSIGNED  NOT NULL COMMENT '등록자번호', -- 등록자번호
   REG_DT             TIMESTAMP     NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '등록일시', -- 등록일시
   UPD_NO             INT UNSIGNED  NOT NULL COMMENT '수정자번호', -- 수정자번호
@@ -13335,6 +13337,7 @@ CREATE TABLE TB_CUST_CONTACT_HST (
   CONTACT_TYPE     VARCHAR(20)   NOT NULL COMMENT '접촉유형(공통코드G054)', -- 접촉유형(공통코드G054)
   CONTACT_METHOD   VARCHAR(20)   NOT NULL COMMENT '접촉방법(공통코드G055)', -- 접촉방법(공통코드G055)
   CONTACT_CONTENTS VARCHAR(4000) NOT NULL COMMENT '접촉내용', -- 접촉내용
+  CONTACT_MEMO     VARCHAR(100)  NULL     COMMENT '접촉메모', -- 접촉메모
   SENDER_NO        INT UNSIGNED  NOT NULL COMMENT '발송자ID(고객, 사용자)', -- 발송자번호
   SEND_DT          TIMESTAMP     NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '발송일시', -- 발송일시
   RECEIVER_NO      INT UNSIGNED  NOT NULL COMMENT '수신자번호', -- 수신자번호
@@ -15987,3 +15990,23 @@ CREATE TABLE TB_NAVERPAY_FAIL_LOG
     REG_DT          TIMESTAMP        NULL COMMENT '등록날짜'
 )
     COMMENT '네이버페이_실패_로그';
+
+################################################################################
+# 수동전시 컨텐츠상품 저장
+################################################################################
+DROP TABLE IF EXISTS TB_CONTENTS_GOODS RESTRICT;
+CREATE TABLE TB_CONTENTS_GOODS (
+  BRAND_GROUP_NO int unsigned NOT NULL COMMENT '브랜드그룹번호(브랜드그룹). BYITEM인 경우 0, BYBRAND인 경우 브랜드그룹번호',
+  CATE_NO int unsigned NOT NULL COMMENT '카테고리코드',
+  LEAF_CATE_NO int unsigned NOT NULL COMMENT '단말카테고리번호',
+  CONTENTS_LOC varchar(20) NOT NULL COMMENT '컨텐츠위치(공통코드G028)',
+  PRE_CONTENTS_SQ int unsigned DEFAULT NULL COMMENT '컨텐츠미리보기일련번호',
+  CONTENTS_SQ int unsigned DEFAULT NULL COMMENT '컨텐츠일련번호',
+  GOODS_CD varchar(20) NOT NULL COMMENT '상품코드',
+  GOODS_NM varchar(200) NOT NULL COMMENT '상품명',
+  IMG_PATH1 varchar(200) NOT NULL COMMENT '이미지경로',
+  DISP_ORD smallint unsigned NOT NULL COMMENT '표시순서',
+  REG_NO int unsigned NOT NULL COMMENT '등록자번호',
+  REG_DT timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '등록일시'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='수동전시 컨텐츠상품 저장. 프론트 메인 화면의 레이아웃 구성 등록에 의한 발생'
+;

+ 70 - 0
산출물/3.설계/ERD/.metadata/.log

@@ -5498,3 +5498,73 @@ Command-line arguments:  -os win32 -ws win32 -arch x86 D:\WIDE\workspace\webapps
 
 !ENTRY org.eclipse.osgi 2 1 2021-05-26 15:29:40.329
 !MESSAGE NLS unused message: ToggleColumnVisibilityHandler_5 in: com.tomato.exerd.handler.messages
+!SESSION 2021-06-01 20:15:25.402 -----------------------------------------------
+eclipse.buildId=M20090211-1700
+java.version=1.6.0_24
+java.vendor=Sun Microsystems Inc.
+BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ko_KR
+Framework arguments:  D:\WIDE\workspace\webapps\style24\style24.doc\산출물\3.설계\ERD\ST24.exerd
+Command-line arguments:  -os win32 -ws win32 -arch x86 D:\WIDE\workspace\webapps\style24\style24.doc\산출물\3.설계\ERD\ST24.exerd
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:26.274
+!MESSAGE NLS unused message: OpenResourceDialog_openButton_text in: org.eclipse.ui.internal.ide.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:26.275
+!MESSAGE NLS unused message: OpenResourceDialog_openWithMenu_label in: org.eclipse.ui.internal.ide.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:26.276
+!MESSAGE NLS unused message: OpenResourceDialog_openWithButton_toolTip in: org.eclipse.ui.internal.ide.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:26.276
+!MESSAGE NLS unused message: CleanDialog_cleanSelectedTaskName in: org.eclipse.ui.internal.ide.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:26.277
+!MESSAGE NLS unused message: RecentWorkspacesPreferencePage_PromptAtStartup_label in: org.eclipse.ui.internal.ide.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:26.277
+!MESSAGE NLS unused message: RecentWorkspacesPreferencePage_RemoveButton_label in: org.eclipse.ui.internal.ide.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:27.813
+!MESSAGE NLS unused message: url_couldNotResolve_projectDoesNotExist in: org.eclipse.core.internal.utils.messages
+
+!ENTRY org.eclipse.core.resources 2 10035 2021-06-01 20:15:27.874
+!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:28.101
+!MESSAGE NLS unused message: Shortcuts_shortcutTab in: org.eclipse.ui.internal.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:28.102
+!MESSAGE NLS unused message: Shortcuts_selectShortcutsLabel in: org.eclipse.ui.internal.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:28.102
+!MESSAGE NLS unused message: Shortcuts_availableMenus in: org.eclipse.ui.internal.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:28.103
+!MESSAGE NLS unused message: Shortcuts_availableCategories in: org.eclipse.ui.internal.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:28.103
+!MESSAGE NLS unused message: Shortcuts_allShortcuts in: org.eclipse.ui.internal.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:28.103
+!MESSAGE NLS unused message: Util_listNull in: org.eclipse.ui.internal.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:28.104
+!MESSAGE NLS unused message: OpenBrowserHandler_NoInfoDialogTitle in: org.eclipse.ui.internal.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:28.104
+!MESSAGE NLS unused message: AboutFeaturesDialog_SimpleTitle in: org.eclipse.ui.internal.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:32.324
+!MESSAGE NLS unused message: BinaryDumpHandler_1 in: com.tomato.exerd.handler.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:32.324
+!MESSAGE NLS unused message: ConvertToXMLHandler_1 in: com.tomato.exerd.handler.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:32.328
+!MESSAGE NLS unused message: SelectHandler_11 in: com.tomato.exerd.handler.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:32.329
+!MESSAGE NLS unused message: ToggleColumnVisibilityHandler_4 in: com.tomato.exerd.handler.messages
+
+!ENTRY org.eclipse.osgi 2 1 2021-06-01 20:15:32.329
+!MESSAGE NLS unused message: ToggleColumnVisibilityHandler_5 in: com.tomato.exerd.handler.messages

BIN
산출물/3.설계/ERD/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap


BIN
산출물/3.설계/ERD/.metadata/.plugins/org.eclipse.core.resources/.root/70.tree


BIN
산출물/3.설계/ERD/.metadata/.plugins/org.eclipse.core.resources/.root/71.tree


BIN
산출물/3.설계/ERD/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources


BIN
산출물/3.설계/ERD/.metadata/.plugins/org.eclipse.core.resources/.snap


+ 1 - 1
산출물/3.설계/ERD/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml

@@ -7,8 +7,8 @@
 	<section name="SaveAsDialogSettings">
 		<item value="525" key="DIALOG_WIDTH"/>
 		<item value="-51" key="DIALOG_Y_ORIGIN"/>
-		<item value="580" key="DIALOG_HEIGHT"/>
 		<item value="88" key="DIALOG_X_ORIGIN"/>
+		<item value="580" key="DIALOG_HEIGHT"/>
 		<item value="1|맑은 고딕|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|맑은 고딕" key="DIALOG_FONT_NAME"/>
 	</section>
 </section>

+ 42 - 42
산출물/3.설계/ERD/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml

@@ -32,10 +32,10 @@
 </folder>
 </info>
 </editorArea>
-<editor id="com.tomato.exerd.editor.DiagramEditor" name="ST24.exerd" partName="ST24.exerd" title="ST24.exerd" tooltip="D:\WIDE\workspace\webapps\style24\style24.doc\산출물\3.설계\ERD\ST24.exerd" workbook="DefaultEditorWorkbook">
+<editor activePart="true" focus="true" id="com.tomato.exerd.editor.DiagramEditor" name="ST24.exerd" partName="ST24.exerd" title="ST24.exerd" tooltip="D:\WIDE\workspace\webapps\style24\style24.doc\산출물\3.설계\ERD\ST24.exerd" workbook="DefaultEditorWorkbook">
 <input factoryID="org.eclipse.ui.ide.FileStoreEditorInputFactory" uri="file:/D:/WIDE/workspace/webapps/style24/style24.doc/산출물/3.설계/ERD/ST24.exerd"/>
 </editor>
-<editor activePart="true" focus="true" id="com.tomato.exerd.editor.DiagramEditor" name="iSTYLE24_Mall.exerd" partName="iSTYLE24_Mall.exerd" title="iSTYLE24_Mall.exerd" tooltip="D:\WIDE\workspace\webapps\style24\style24.doc\산출물\3.설계\ERD\asis\iSTYLE24_Mall.exerd" workbook="DefaultEditorWorkbook">
+<editor id="com.tomato.exerd.editor.DiagramEditor" name="iSTYLE24_Mall.exerd" partName="iSTYLE24_Mall.exerd" title="iSTYLE24_Mall.exerd" tooltip="D:\WIDE\workspace\webapps\style24\style24.doc\산출물\3.설계\ERD\asis\iSTYLE24_Mall.exerd" workbook="DefaultEditorWorkbook">
 <input factoryID="org.eclipse.ui.ide.FileStoreEditorInputFactory" uri="file:/D:/WIDE/workspace/webapps/style24/style24.doc/산출물/3.설계/ERD/asis/iSTYLE24_Mall.exerd"/>
 </editor>
 <editor id="com.tomato.exerd.editor.DiagramEditor" name="iSTYLE24_Wms.exerd" partName="iSTYLE24_Wms.exerd" title="iSTYLE24_Wms.exerd" tooltip="D:\WIDE\workspace\webapps\style24\style24.doc\산출물\3.설계\ERD\asis\iSTYLE24_Wms.exerd" workbook="DefaultEditorWorkbook">
@@ -169,7 +169,6 @@
 <editors>
 <editor factoryID="org.eclipse.ui.ide.FileStoreEditorInputFactory" id="com.tomato.exerd.editor.DiagramEditor" uri="file:/D:/WIDE/workspace/webapps/style24/style24.doc/산출물/3.설계/ERD/asis/iSTYLE24_Mall.exerd"/>
 <editor factoryID="org.eclipse.ui.ide.FileStoreEditorInputFactory" id="com.tomato.exerd.editor.DiagramEditor" uri="file:/D:/WIDE/workspace/webapps/style24/style24.doc/산출물/3.설계/ERD/ST24.exerd"/>
-<editor factoryID="org.eclipse.ui.ide.FileStoreEditorInputFactory" id="com.tomato.exerd.editor.DiagramEditor" uri="file:/D:/WIDE/workspace/webapps/style24/style24.doc/산출물/3.설계/ERD/ST24.exerd"/>
 <editor factoryID="org.eclipse.ui.ide.FileStoreEditorInputFactory" id="com.tomato.exerd.editor.DiagramEditor" uri="file:/D:/WIDE/workspace/webapps/style24/style24.doc/산출물/3.설계/ERD/asis/iSTYLE24_Mall.exerd"/>
 <editor factoryID="org.eclipse.ui.ide.FileStoreEditorInputFactory" id="com.tomato.exerd.editor.DiagramEditor" uri="file:/D:/WIDE/workspace/webapps/style24/style24.doc/산출물/3.설계/ERD/asis/iSTYLE24_Mall.exerd"/>
 <editor factoryID="org.eclipse.ui.ide.FileStoreEditorInputFactory" id="com.tomato.exerd.editor.DiagramEditor" uri="file:/D:/WIDE/workspace/webapps/style24/style24.doc/산출물/3.설계/ERD/ST24.exerd"/>
@@ -178,57 +177,58 @@
 <editor factoryID="org.eclipse.ui.ide.FileStoreEditorInputFactory" id="com.tomato.exerd.editor.DiagramEditor" uri="file:/D:/WIDE/workspace/webapps/style24/style24.doc/산출물/3.설계/ERD/asis/iSTYLE24_Mall.exerd"/>
 <editor factoryID="org.eclipse.ui.ide.FileStoreEditorInputFactory" id="com.tomato.exerd.editor.DiagramEditor" uri="file:/D:/WIDE/workspace/webapps/style24/style24.doc/산출물/3.설계/ERD/ST24.exerd"/>
 <editor factoryID="org.eclipse.ui.ide.FileStoreEditorInputFactory" id="com.tomato.exerd.editor.DiagramEditor" uri="file:/D:/WIDE/workspace/webapps/style24/style24.doc/산출물/3.설계/ERD/asis/iSTYLE24_Mall.exerd"/>
+<editor factoryID="org.eclipse.ui.ide.FileStoreEditorInputFactory" id="com.tomato.exerd.editor.DiagramEditor" uri="file:/D:/WIDE/workspace/webapps/style24/style24.doc/산출물/3.설계/ERD/ST24.exerd"/>
 </editors>
-<item historyLabel="ST24.exerd" index="1"/>
 <item historyLabel="iSTYLE24_Mall.exerd" index="0"/>
-<item historyLabel="ST24.exerd" index="2"/>
+<item historyLabel="ST24.exerd" index="1"/>
 <item historyLabel="iSTYLE24_Mall.exerd" index="0"/>
-<item historyLabel="ST24.exerd" index="2"/>
+<item historyLabel="ST24.exerd" index="1"/>
 <item historyLabel="iSTYLE24_Mall.exerd" index="0"/>
-<item historyLabel="ST24.exerd" index="2"/>
+<item historyLabel="ST24.exerd" index="1"/>
 <item historyLabel="iSTYLE24_Mall.exerd" index="0"/>
-<item historyLabel="ST24.exerd" index="2"/>
+<item historyLabel="ST24.exerd" index="1"/>
 <item historyLabel="iSTYLE24_Mall.exerd" index="0"/>
-<item historyLabel="ST24.exerd" index="2"/>
+<item historyLabel="ST24.exerd" index="1"/>
 <item historyLabel="iSTYLE24_Mall.exerd" index="0"/>
-<item historyLabel="ST24.exerd" index="2"/>
+<item historyLabel="ST24.exerd" index="1"/>
 <item historyLabel="iSTYLE24_Mall.exerd" index="0"/>
-<item historyLabel="ST24.exerd" index="2"/>
+<item historyLabel="ST24.exerd" index="1"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="2"/>
+<item historyLabel="ST24.exerd" index="1"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="2"/>
+<item historyLabel="ST24.exerd" index="1"/>
 <item historyLabel="iSTYLE24_Mall.exerd" index="3"/>
-<item historyLabel="ST24.exerd" index="2"/>
+<item historyLabel="ST24.exerd" index="1"/>
 <item historyLabel="iSTYLE24_Mall.exerd" index="3"/>
-<item historyLabel="ST24.exerd" index="2"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="4"/>
-<item historyLabel="ST24.exerd" index="2"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="4"/>
-<item historyLabel="ST24.exerd" index="2"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="4"/>
-<item historyLabel="ST24.exerd" index="2"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="4"/>
-<item historyLabel="ST24.exerd" index="2"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="4"/>
-<item historyLabel="ST24.exerd" index="2"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="4"/>
-<item historyLabel="ST24.exerd" index="5"/>
+<item historyLabel="ST24.exerd" index="1"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="3"/>
+<item historyLabel="ST24.exerd" index="1"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="3"/>
+<item historyLabel="ST24.exerd" index="1"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="3"/>
+<item historyLabel="ST24.exerd" index="1"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="3"/>
+<item historyLabel="ST24.exerd" index="4"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="5"/>
+<item historyLabel="ST24.exerd" index="4"/>
 <item historyLabel="iSTYLE24_Mall.exerd" index="6"/>
-<item historyLabel="ST24.exerd" index="5"/>
+<item historyLabel="ST24.exerd" index="4"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="7"/>
+<item historyLabel="ST24.exerd" index="4"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="7"/>
+<item historyLabel="ST24.exerd" index="4"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="7"/>
+<item historyLabel="ST24.exerd" index="4"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="7"/>
+<item historyLabel="ST24.exerd" index="4"/>
 <item historyLabel="iSTYLE24_Mall.exerd" index="7"/>
-<item historyLabel="ST24.exerd" index="5"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="8"/>
-<item historyLabel="ST24.exerd" index="5"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="8"/>
-<item historyLabel="ST24.exerd" index="5"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="8"/>
-<item historyLabel="ST24.exerd" index="5"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="8"/>
-<item historyLabel="ST24.exerd" index="5"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="8"/>
-<item historyLabel="ST24.exerd" index="9"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="10"/>
-<item historyLabel="ST24.exerd" index="9"/>
-<item historyLabel="iSTYLE24_Mall.exerd" index="10"/>
-<item historyLabel="ST24.exerd" index="9"/>
-<item active="true" historyLabel="iSTYLE24_Mall.exerd" index="10"/>
+<item historyLabel="ST24.exerd" index="8"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="9"/>
+<item historyLabel="ST24.exerd" index="8"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="9"/>
+<item historyLabel="ST24.exerd" index="8"/>
+<item historyLabel="iSTYLE24_Mall.exerd" index="9"/>
+<item active="true" historyLabel="ST24.exerd" index="10"/>
 </navigationHistory>
 <input factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/" type="8"/>
 </page>

BIN
산출물/3.설계/ERD/ST24.exerd


+ 68 - 65
산출물/4.구축/데이터처리/07.카테고리재고생성(TB_CATE_STOCK).sql

@@ -1,5 +1,66 @@
-TRUNCATE TABLE TB_CATE_STOCK;
 
+TRUNCATE TABLE TB_CATE_STOCK_TMP;
+INSERT INTO TB_CATE_STOCK_TMP
+SELECT B.SITE_CD
+     , B.CATE1_NO
+     , B.CATE2_NO
+     , B.CATE3_NO
+     , B.CATE4_NO
+     , B.CATE5_NO
+     , A.GOODS_CD
+     , C.BRAND_GROUP_NO
+     , C.FORMAL_GB
+     , C.STOCK_QTY
+FROM   TB_CATE_GOODS A
+     , TB_CATE_4SRCH B
+     , (
+        SELECT G.GOODS_CD
+             , B.BRAND_GROUP_NO
+             , G.FORMAL_GB
+             , SUM(S.CURR_STOCK_QTY - S.BASE_STOCK_QTY) AS STOCK_QTY
+        FROM   TB_GOODS G USE INDEX (IX_GOODS_11)
+             , VW_STOCK S
+             , TB_BRAND B
+        WHERE  G.GOODS_CD = S.GOODS_CD
+        AND    G.BRAND_CD = B.BRAND_CD
+        AND    G.GOODS_TYPE = 'G056_N' /*일반상품*/
+        AND    G.GOODS_STAT = 'G008_90' /*승인된상품*/
+        AND    G.SELF_MALL_YN = 'Y' /*자사몰에노출하는넘만*/
+        AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT /*유효한판매기간*/
+        AND    S.SOLDOUT_YN = 'N' /*품절이아닌넘*/
+        AND    S.DISP_YN = 'Y' /*사이즈노출하는넘만*/
+        AND    S.CURR_STOCK_QTY - S.BASE_STOCK_QTY > 0 /*재고있는넘만*/
+        GROUP  BY G.GOODS_CD, B.BRAND_GROUP_NO, G.FORMAL_GB
+        UNION ALL
+        SELECT G.GOODS_CD
+             , B.BRAND_GROUP_NO
+             , G.FORMAL_GB
+             , SUM(S.CURR_STOCK_QTY - S.BASE_STOCK_QTY) AS STOCK_QTY
+        FROM   TB_GOODS G USE INDEX (IX_GOODS_11)
+             , TB_GOODS_COMPOSE GC
+             , VW_STOCK S
+             , TB_BRAND B
+        WHERE  G.GOODS_CD = GC.GOODS_CD
+        AND    GC.COMPS_GOODS_CD = S.GOODS_CD
+        AND    G.BRAND_CD = B.BRAND_CD
+        AND    G.GOODS_TYPE != 'G056_N' /*일반상품이 아닌넘*/
+        AND    G.GOODS_STAT = 'G008_90' /*승인된상품*/
+        AND    G.SELF_GOODS_YN = 'Y' /*자사상품만(세트상품과 딜상품은 자사상품만)*/
+        AND    G.SELF_MALL_YN = 'Y' /*자사몰에노출하는넘만*/
+        AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT /*유효한판매기간*/
+        AND    GC.USE_YN = 'Y' /*사용하는구성상품*/
+        AND    S.SOLDOUT_YN = 'N' /*품절이아닌넘*/
+        AND    S.DISP_YN = 'Y' /*사이즈노출하는넘만*/
+        AND    S.CURR_STOCK_QTY - S.BASE_STOCK_QTY > 0 /*재고있는넘만*/
+        GROUP  BY G.GOODS_CD, B.BRAND_GROUP_NO, G.FORMAL_GB
+       ) C
+WHERE  A.GOODS_CD = C.GOODS_CD
+AND    A.CATE_NO = B.LEAF_CATE_NO
+AND    B.CATE_TYPE = 'G031_10' /*상품분류카테고리*/
+;
+
+
+TRUNCATE TABLE TB_CATE_STOCK;
 INSERT INTO TB_CATE_STOCK (
        SITE_CD
      , CATE_NO
@@ -10,64 +71,6 @@ INSERT INTO TB_CATE_STOCK (
      , REG_NO
      , REG_DT
 )
-WITH TAB AS (
-    SELECT B.SITE_CD
-         , B.CATE1_NO
-         , B.CATE2_NO
-         , B.CATE3_NO
-         , B.CATE4_NO
-         , B.CATE5_NO
-         , A.GOODS_CD
-         , C.BRAND_GROUP_NO
-         , C.FORMAL_GB
-         , C.STOCK_QTY
-    FROM   TB_CATE_GOODS A
-         , TB_CATE_4SRCH B
-         , (
-            SELECT G.GOODS_CD
-                 , B.BRAND_GROUP_NO
-                 , G.FORMAL_GB
-                 , SUM(S.CURR_STOCK_QTY - S.BASE_STOCK_QTY) AS STOCK_QTY
-            FROM   TB_GOODS G
-                 , VW_STOCK S
-                 , TB_BRAND B
-            WHERE  G.GOODS_CD = S.GOODS_CD
-            AND    G.BRAND_CD = B.BRAND_CD
-            AND    G.GOODS_TYPE = 'G056_N' /*일반상품*/
-            AND    G.GOODS_STAT = 'G008_90' /*승인된상품*/
-            AND    G.SELF_MALL_YN = 'Y' /*자사몰에노출하는넘만*/
-            AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT /*유효한판매기간*/
-            AND    S.SOLDOUT_YN = 'N' /*품절이아닌넘*/
-            AND    S.DISP_YN = 'Y' /*사이즈노출하는넘만*/
-            AND    S.CURR_STOCK_QTY - S.BASE_STOCK_QTY > 0 /*재고있는넘만*/
-            GROUP  BY G.GOODS_CD, B.BRAND_GROUP_NO, G.FORMAL_GB
-            UNION ALL
-            SELECT G.GOODS_CD
-                 , B.BRAND_GROUP_NO
-                 , G.FORMAL_GB
-                 , SUM(S.CURR_STOCK_QTY - S.BASE_STOCK_QTY) AS STOCK_QTY
-            FROM   TB_GOODS G
-                 , TB_GOODS_COMPOSE GC
-                 , VW_STOCK S
-                 , TB_BRAND B
-            WHERE  G.GOODS_CD = GC.GOODS_CD
-            AND    GC.COMPS_GOODS_CD = S.GOODS_CD
-            AND    G.BRAND_CD = B.BRAND_CD
-            AND    G.GOODS_TYPE != 'G056_N' /*일반상품이 아닌넘*/
-            AND    G.GOODS_STAT = 'G008_90' /*승인된상품*/
-            AND    G.SELF_GOODS_YN = 'Y' /*자사상품만(세트상품과 딜상품은 자사상품만)*/
-            AND    G.SELF_MALL_YN = 'Y' /*자사몰에노출하는넘만*/
-            AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT /*유효한판매기간*/
-            AND    GC.USE_YN = 'Y' /*사용하는구성상품*/
-            AND    S.SOLDOUT_YN = 'N' /*품절이아닌넘*/
-            AND    S.DISP_YN = 'Y' /*사이즈노출하는넘만*/
-            AND    S.CURR_STOCK_QTY - S.BASE_STOCK_QTY > 0 /*재고있는넘만*/
-            GROUP  BY G.GOODS_CD, B.BRAND_GROUP_NO, G.FORMAL_GB
-           ) C
-    WHERE  A.GOODS_CD = C.GOODS_CD
-    AND    A.CATE_NO = B.LEAF_CATE_NO
-    AND    B.CATE_TYPE = 'G031_10' /*상품분류카테고리*/
-)
 SELECT SITE_CD
      , CATE_NO
      , BRAND_GROUP_NO
@@ -83,7 +86,7 @@ FROM   (
              , FORMAL_GB
              , SUM(STOCK_QTY)           AS STOCK_QTY
              , COUNT(DISTINCT GOODS_CD) AS GOODS_QTY
-        FROM   TAB
+        FROM   TB_CATE_STOCK_TMP
         WHERE  CATE5_NO IS NOT NULL
         GROUP  BY SITE_CD, CATE5_NO, BRAND_GROUP_NO, FORMAL_GB
         HAVING SUM(STOCK_QTY) > 0
@@ -94,7 +97,7 @@ FROM   (
              , FORMAL_GB
              , SUM(STOCK_QTY)           AS STOCK_QTY
              , COUNT(DISTINCT GOODS_CD) AS GOODS_QTY
-        FROM   TAB
+        FROM   TB_CATE_STOCK_TMP
         WHERE  CATE4_NO IS NOT NULL
         GROUP  BY SITE_CD, CATE4_NO, BRAND_GROUP_NO, FORMAL_GB
         HAVING SUM(STOCK_QTY) > 0
@@ -105,7 +108,7 @@ FROM   (
              , FORMAL_GB
              , SUM(STOCK_QTY)           AS STOCK_QTY
              , COUNT(DISTINCT GOODS_CD) AS GOODS_QTY
-        FROM   TAB
+        FROM   TB_CATE_STOCK_TMP
         WHERE  CATE3_NO IS NOT NULL
         GROUP  BY SITE_CD, CATE3_NO, BRAND_GROUP_NO, FORMAL_GB
         HAVING SUM(STOCK_QTY) > 0
@@ -116,7 +119,7 @@ FROM   (
              , FORMAL_GB
              , SUM(STOCK_QTY)           AS STOCK_QTY
              , COUNT(DISTINCT GOODS_CD) AS GOODS_QTY
-        FROM   TAB
+        FROM   TB_CATE_STOCK_TMP
         WHERE  CATE2_NO IS NOT NULL
         GROUP  BY SITE_CD, CATE2_NO, BRAND_GROUP_NO, FORMAL_GB
         HAVING SUM(STOCK_QTY) > 0
@@ -127,7 +130,7 @@ FROM   (
              , FORMAL_GB
              , SUM(STOCK_QTY)           AS STOCK_QTY
              , COUNT(DISTINCT GOODS_CD) AS GOODS_QTY
-        FROM   TAB
+        FROM   TB_CATE_STOCK_TMP
         WHERE  CATE1_NO IS NOT NULL
         GROUP  BY SITE_CD, CATE1_NO, BRAND_GROUP_NO, FORMAL_GB
         HAVING SUM(STOCK_QTY) > 0
@@ -135,6 +138,6 @@ FROM   (
 WHERE  CATE_NO IS NOT NULL
 ;
 
-COMMIT;
+
 
 SELECT * FROM TB_CATE_STOCK;