|
@@ -102,6 +102,9 @@
|
102
|
102
|
from rtn_req_base_info base
|
103
|
103
|
where 1 = 1
|
104
|
104
|
and base.brand_id = #{sBrandId}
|
|
105
|
+ <if test="sStoreId == null or sStoreId == ''">
|
|
106
|
+ and ((base.store_id is null or base.store_id = '') or (base.store_id is not null and base.store_id <![CDATA[ <> ]]> '' and base.rtn_req_st_cd <![CDATA[ <> ]]> 'RR00'))
|
|
107
|
+ </if>
|
105
|
108
|
and base.col_req_dt between #{fromDt} and #{toDt}
|
106
|
109
|
<if test="sStoreId != null and sStoreId != ''">
|
107
|
110
|
and base.store_id = #{sStoreId}
|
|
@@ -118,6 +121,9 @@
|
118
|
121
|
rtn_req_dtl_ptcl ptcl
|
119
|
122
|
where sbase.rtn_req_unq_no = ptcl.rtn_req_unq_no
|
120
|
123
|
and sbase.brand_id = #{sBrandId}
|
|
124
|
+ <if test="sStoreId == null or sStoreId == ''">
|
|
125
|
+ and ((sbase.store_id is null or sbase.store_id = '') or (sbase.store_id is not null and sbase.store_id <![CDATA[ <> ]]> '' and sbase.rtn_req_st_cd <![CDATA[ <> ]]> 'RR00'))
|
|
126
|
+ </if>
|
121
|
127
|
and sbase.col_req_dt between #{fromDt} and #{toDt}
|
122
|
128
|
<if test="sStoreId != null and sStoreId != ''">
|
123
|
129
|
and sbase.store_id = #{sStoreId}
|
|
@@ -155,6 +161,9 @@
|
155
|
161
|
from rtn_req_base_info base
|
156
|
162
|
where 1 = 1
|
157
|
163
|
and base.brand_id = #{sBrandId}
|
|
164
|
+ <if test="sStoreId == null or sStoreId == ''">
|
|
165
|
+ and ((base.store_id is null or base.store_id = '') or (base.store_id is not null and base.store_id <![CDATA[ <> ]]> '' and base.rtn_req_st_cd <![CDATA[ <> ]]> 'RR00'))
|
|
166
|
+ </if>
|
158
|
167
|
and base.col_req_dt between #{fromDt} and #{toDt}
|
159
|
168
|
<if test="sStoreId != null and sStoreId != ''">
|
160
|
169
|
and base.store_id = #{sStoreId}
|
|
@@ -171,6 +180,9 @@
|
171
|
180
|
rtn_req_dtl_ptcl ptcl
|
172
|
181
|
where sbase.rtn_req_unq_no = ptcl.rtn_req_unq_no
|
173
|
182
|
and sbase.brand_id = #{sBrandId}
|
|
183
|
+ <if test="sStoreId == null or sStoreId == ''">
|
|
184
|
+ and ((sbase.store_id is null or sbase.store_id = '') or (sbase.store_id is not null and sbase.store_id <![CDATA[ <> ]]> '' and sbase.rtn_req_st_cd <![CDATA[ <> ]]> 'RR00'))
|
|
185
|
+ </if>
|
174
|
186
|
and sbase.col_req_dt between #{fromDt} and #{toDt}
|
175
|
187
|
<if test="sStoreId != null and sStoreId != ''">
|
176
|
188
|
and sbase.store_id = #{sStoreId}
|