Bladeren bron

정산현황 쿼리 수정

isna 2 jaren geleden
bovenliggende
commit
ac1350bb9d
1 gewijzigde bestanden met toevoegingen van 13 en 2 verwijderingen
  1. 13 2
      src/main/resources/mybatis/sqlmaps/sttlmng/SttlState.xml

+ 13 - 2
src/main/resources/mybatis/sqlmaps/sttlmng/SttlState.xml

@@ -22,7 +22,13 @@
22 22
         LEFT JOIN store_base_info B ON A.brand_id = B.brand_id AND A.store_id = B.store_id
23 23
         WHERE A.brand_id = #{sBrandId}
24 24
         AND A.sttl_req_dt BETWEEN #{fromDt} AND #{toDt}
25
-        AND A.sttl_st_cd IN ('ST10','ST30')
25
+        <when test="pageType != null and pageType != ''"> 
26
+            AND A.sttl_st_cd IN ('ST10', 'ST20','ST30')
27
+        </when>
28
+        <otherwise>
29
+            AND A.sttl_st_cd IN ('ST10','ST30')
30
+        </otherwise>
31
+        
26 32
         <if test="sGubun == 1">
27 33
             AND A.store_id IS NOT NULL
28 34
             AND A.sttl_target_cd = 'S0'
@@ -67,7 +73,12 @@
67 73
         LEFT JOIN store_base_info B ON A.brand_id = B.brand_id AND A.store_id = B.store_id
68 74
         WHERE A.brand_id = #{sBrandId}
69 75
         AND A.sttl_req_dt BETWEEN #{fromDt} AND #{toDt}
70
-        AND A.sttl_st_cd IN ('ST10','ST30')
76
+         <when test="pageType != null and pageType != ''"> 
77
+            AND A.sttl_st_cd IN ('ST10', 'ST20','ST30')
78
+        </when>
79
+        <otherwise>
80
+            AND A.sttl_st_cd IN ('ST10','ST30')
81
+        </otherwise>
71 82
         <if test="sGubun == 1">
72 83
             AND A.store_id IS NOT NULL
73 84
             AND A.sttl_target_cd = 'S0'