|
|
@@ -332,6 +332,67 @@
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
|
+ <!-- 입점클레임목록조회(교환,반품접수) -->
|
|
|
+ <select id="getOrderSellerClaimCount" parameterType="Order" resultType="int">
|
|
|
+ /* tscScm.getOrderSellerClaimCount */
|
|
|
+ SELECT COUNT(1)
|
|
|
+ FROM TB_ORDER_CHANGE_DETAIL OCD
|
|
|
+ INNER JOIN TB_ORDER_CHANGE OC
|
|
|
+ ON OCD.ORD_CHG_SQ = OC.ORD_CHG_SQ
|
|
|
+ INNER JOIN TB_ORDER_DETAIL OD
|
|
|
+ ON OCD.ORD_DTL_NO = OD.ORD_DTL_NO
|
|
|
+ INNER JOIN TB_ORDER O
|
|
|
+ ON OD.ORD_NO = O.ORD_NO
|
|
|
+ INNER JOIN TB_GOODS G
|
|
|
+ ON OD.GOODS_CD = G.GOODS_CD
|
|
|
+ INNER JOIN TB_ORDER_DETAIL_ITEM ODI
|
|
|
+ ON OD.ORD_DTL_NO = ODI.ORD_DTL_NO
|
|
|
+ LEFT OUTER JOIN TB_ORDER_DETAIL OD2
|
|
|
+ ON OCD.CHG_ORD_DTL_NO = OD2.ORD_DTL_NO
|
|
|
+ LEFT OUTER JOIN TB_ORDER_DETAIL_ITEM ODI2
|
|
|
+ ON OD2.ORD_DTL_NO = ODI2.ORD_DTL_NO
|
|
|
+ WHERE 1=1
|
|
|
+ AND G.SELF_GOODS_YN = 'N'
|
|
|
+ <if test='supplyCompCd != null and supplyCompCd != ""'>
|
|
|
+ AND OD.SUPPLY_COMP_CD = #{supplyCompCd}
|
|
|
+ </if>
|
|
|
+ <if test="multiBrand != null and multiBrand != ''">
|
|
|
+ AND G.BRAND_CD IN
|
|
|
+ <foreach collection="multiBrand" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test='chgGb != null and chgGb != ""'>
|
|
|
+ AND OC.CHG_GB = #{chgGb}
|
|
|
+ </if>
|
|
|
+ <if test="multiChgStat != null and multiChgStat != ''">
|
|
|
+ AND OCD.CHG_STAT IN
|
|
|
+ <foreach collection="multiChgStat" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="ordNo != null and ordNo != ''">
|
|
|
+ AND O.ORD_NO = #{ordNo}
|
|
|
+ </if>
|
|
|
+ <if test="chgerNm != null and chgerNm != ''">
|
|
|
+ AND OC.CHGER_NM = #{chgerNm}
|
|
|
+ </if>
|
|
|
+ <if test='goodsCd != null and goodsCd != ""'>
|
|
|
+ AND G.GOODS_CD = #{goodsCd}
|
|
|
+ </if>
|
|
|
+ <if test='ordChgSq != null and ordChgSq != ""'>
|
|
|
+ AND OCD.ORD_CHG_SQ = #{ordChgSq}
|
|
|
+ </if>
|
|
|
+ <if test='stDate != null and stDate != ""'>
|
|
|
+ <if test='searchDateGb != null and searchDateGb == "ordDt"'>
|
|
|
+ AND OC.REG_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
|
|
|
+ AND OC.REG_DT <![CDATA[<]]> DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ AND OCD.CHG_STAT NOT IN ('G685_19', 'G685_49', 'G685_69')
|
|
|
+ AND OCD.CHG_QTY > 0
|
|
|
+ </select>
|
|
|
+
|
|
|
<!-- 입점클레임목록조회(교환,반품접수) -->
|
|
|
<select id="getOrderSellerClaimList" parameterType="Order" resultType="Order">
|
|
|
/* tscScm.getOrderSellerClaimList */
|
|
|
@@ -430,6 +491,7 @@
|
|
|
</if>
|
|
|
</if>
|
|
|
AND OCD.CHG_STAT NOT IN ('G685_19', 'G685_49', 'G685_69')
|
|
|
+ AND OCD.CHG_QTY > 0
|
|
|
ORDER BY OC.REG_DT ASC
|
|
|
</select>
|
|
|
|