Browse Source

수정처리

dwkim 2 years ago
parent
commit
ce1b28dd7b
1 changed files with 6 additions and 6 deletions
  1. 6 6
      src/main/resources/mybatis/sqlmaps/stinfo/ItemUnit.xml

+ 6 - 6
src/main/resources/mybatis/sqlmaps/stinfo/ItemUnit.xml

@@ -576,12 +576,12 @@
576 576
                 , stck.PRP_STCK_QTY /* 안전재고 기준수량 */
577 577
                 , stck.SFT_STCK_RT /* 안전재고율 */
578 578
                 ,'S' as unit_gubun
579
-                , whs.whs_nm
579
+                 , concat( whs.whs_nm , case when loc.location is null  then '' else  concat('-',loc.LOCATION_NM) end) as whs_nm
580 580
         FROM store_base_info store
581 581
         INNER JOIN whs_mgnt_base_info whs
582
-            ON store.STORE_ID = whs.STORE_ID AND store.BRAND_ID = whs.BRAND_ID
582
+            ON store.STORE_ID = whs.STORE_ID AND store.BRAND_ID = whs.BRAND_ID and whs.WHS_ID = #{sWhsId} and whs.WHS_DVSN = 'W02'
583 583
         INNER JOIN whs_mgnt_base_loc loc
584
-            ON whs.whs_id = loc.whs_id and whs.WHS_ID = #{sWhsId} and whs.WHS_DVSN = 'W02'
584
+            ON whs.whs_id = loc.whs_id and whs.brand_id = loc.brand_id
585 585
         INNER JOIN stck_mgnt_base_info stck
586 586
             ON store.BRAND_ID = stck.BRAND_ID AND whs.WHS_ID = stck.WHS_ID and loc.location = stck.location
587 587
         INNER JOIN store_item_unit_info sitem
@@ -651,12 +651,12 @@
651 651
         , stck.SFT_STCK_RT /* 안전재고율 */
652 652
         , whs.WHS_ID
653 653
         ,'B' as unit_gubun
654
-        , whs.whs_nm
654
+        , concat( whs.whs_nm , case when loc.location is null  then '' else  concat('-',loc.LOCATION_NM) end) as whs_nm
655 655
         FROM brand_base_info brand
656 656
         INNER JOIN whs_mgnt_base_info whs
657
-            ON brand.BRAND_ID = whs.BRAND_ID
657
+            ON brand.BRAND_ID = whs.BRAND_ID and whs.WHS_ID = #{sWhsId} and whs.WHS_DVSN = 'W01'
658 658
         INNER JOIN whs_mgnt_base_loc loc
659
-            ON whs.whs_id = loc.whs_id and whs.WHS_ID = #{sWhsId} and whs.WHS_DVSN = 'W01'
659
+            ON whs.whs_id = loc.whs_id and whs.brand_id = loc.brand_id
660 660
         INNER JOIN stck_mgnt_base_info stck
661 661
             ON brand.BRAND_ID = stck.BRAND_ID AND whs.WHS_ID = stck.WHS_ID and loc.location = stck.location
662 662
         INNER JOIN brand_item_unit_info bitem