Procházet zdrojové kódy

반품은 공급사 정산만

marseyes před 2 roky
rodič
revize
9fa94f186a

+ 4 - 8
src/main/resources/mybatis/sqlmaps/sttlmng/SttlReq.xml

@@ -83,10 +83,8 @@
83 83
             AND rpip.sttl_yn = 'N'
84 84
             AND (smbi.sttl_st_cd IS NULL OR smbi.sttl_st_cd IN ('ST00', 'ST30'))    /* 정산요청 이전, 임시저장, 정산반려 */
85 85
             AND rpip.brand_id = #{sBrandId}
86
-            <if test="sStoreId != null and sStoreId != ''">               /* 매장 정산요청 */
87
-            AND rpip.store_id = #{sStoreId}
88
-            </if>
89
-            <if test="sSpplyId != null and sSpplyId != ''">        /* 공급사 정산요청 */
86
+            AND (rpip.store_id IS NULL OR rpip.store_id = '')       /* 반품은 공급사 정산만  */
87
+            <if test="sSpplyId != null and sSpplyId != ''">         /* 공급사 정산요청 */
90 88
             AND rpip.spply_id = #{sSpplyId}
91 89
             </if>
92 90
             <if test="sItemNm != null and sItemNm != ''">
@@ -155,10 +153,8 @@
155 153
             AND rpip.sttl_yn = 'N'
156 154
             AND (smbi.sttl_st_cd IS NULL OR smbi.sttl_st_cd IN ('ST00', 'ST30'))    /* 정산요청 이전, 임시저장, 정산반려 */
157 155
             AND rpip.brand_id = #{sBrandId}
158
-            <if test="sStoreId != null and sStoreId != ''">          /* 매장 정산요청 */
159
-                AND rpip.store_id = #{sStoreId}
160
-            </if>
161
-            <if test="sSpplyId != null and sSpplyId != ''">        /* 공급사 정산요청 */
156
+            AND (rpip.store_id IS NULL OR rpip.store_id = '')       /* 반품은 공급사 정산만  */
157
+            <if test="sSpplyId != null and sSpplyId != ''">         /* 공급사 정산요청 */
162 158
                 AND rpip.spply_id = #{sSpplyId}
163 159
             </if>
164 160
             <if test="sItemNm != null and sItemNm != ''">