|
@@ -24,6 +24,18 @@
|
|
|
AND P.PAY_GB = 'O'
|
|
AND P.PAY_GB = 'O'
|
|
|
INNER JOIN TB_DELIVERY_ADDR DA
|
|
INNER JOIN TB_DELIVERY_ADDR DA
|
|
|
ON OD.DELV_ADDR_SQ = DA.DELV_ADDR_SQ
|
|
ON OD.DELV_ADDR_SQ = DA.DELV_ADDR_SQ
|
|
|
|
|
+ LEFT OUTER JOIN (
|
|
|
|
|
+ SELECT OC.WD_INVOICE_NO
|
|
|
|
|
+ , OC.WD_INVOICE_SEND_YN
|
|
|
|
|
+ , OC.SHIP_COMP_CD
|
|
|
|
|
+ , OCD.ORD_DTL_NO
|
|
|
|
|
+ , OCD.CHG_QTY
|
|
|
|
|
+ , OCD.CHG_STAT
|
|
|
|
|
+ FROM TB_ORDER_CHANGE OC
|
|
|
|
|
+ INNER JOIN TB_ORDER_CHANGE_DETAIL OCD
|
|
|
|
|
+ ON OC.ORD_CHG_SQ = OCD.ORD_CHG_SQ
|
|
|
|
|
+ ) OCD
|
|
|
|
|
+ ON OD.ORD_DTL_NO = OCD.ORD_DTL_NO
|
|
|
WHERE 1=1
|
|
WHERE 1=1
|
|
|
<if test='siteCd != null and siteCd != ""'>
|
|
<if test='siteCd != null and siteCd != ""'>
|
|
|
AND O.SITE_CD = #{siteCd}
|
|
AND O.SITE_CD = #{siteCd}
|
|
@@ -34,8 +46,8 @@
|
|
|
<if test='supplyCompCd != null and supplyCompCd != ""'>
|
|
<if test='supplyCompCd != null and supplyCompCd != ""'>
|
|
|
AND OD.SUPPLY_COMP_CD = #{supplyCompCd}
|
|
AND OD.SUPPLY_COMP_CD = #{supplyCompCd}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="multiBrand != null and multiBrand != ''">
|
|
|
|
|
- AND G1.BRAND_CD IN
|
|
|
|
|
|
|
+ <if test="multiBrand != null and multiBrand != ''">
|
|
|
|
|
+ AND G1.BRAND_CD IN
|
|
|
<foreach collection="multiBrand" item="item" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="multiBrand" item="item" index="index" open="(" close=")" separator=",">
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
@@ -46,6 +58,28 @@
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="multiOrdDtlStat == null or multiOrdDtlStat == ''">
|
|
|
|
|
+ <if test="multiOrdStat != null and multiOrdStat != ''">
|
|
|
|
|
+ AND OD.ORD_DTL_STAT IN
|
|
|
|
|
+ <foreach collection="multiOrdStat" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="chgStat != null and chgStat != ''">
|
|
|
|
|
+ AND OCD.CHG_STAT = #{chgStat}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="chgStat == null or chgStat == ''">
|
|
|
|
|
+ <if test="chgGb != null and chgGb != ''">
|
|
|
|
|
+ AND OCD.CHG_STAT = #{chgGb}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="chgStat != null and chgStat != ''">
|
|
|
|
|
+ AND OCD.CHG_STAT = #{chgStat}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="chgStat == null or chgStat == ''">
|
|
|
|
|
+ AND OCD.CHG_STAT = #{chgGb}
|
|
|
|
|
+ </if>
|
|
|
<if test='search != null and search == "searchOrdNo"'>
|
|
<if test='search != null and search == "searchOrdNo"'>
|
|
|
<if test="condition != null and condition != ''">
|
|
<if test="condition != null and condition != ''">
|
|
|
AND O.ORD_NO = #{condition}
|
|
AND O.ORD_NO = #{condition}
|
|
@@ -53,9 +87,35 @@
|
|
|
</if>
|
|
</if>
|
|
|
<if test='search != null and search == "searchExtmallOrderId"'>
|
|
<if test='search != null and search == "searchExtmallOrderId"'>
|
|
|
<if test="condition != null and condition != ''">
|
|
<if test="condition != null and condition != ''">
|
|
|
- AND O.ORD_NO = #{condition}
|
|
|
|
|
|
|
+ AND OD.EXTMALL_ORDER_ID = #{condition}
|
|
|
</if>
|
|
</if>
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test='search != null and search == "searchAgentOrderId"'>
|
|
|
|
|
+ <if test="condition != null and condition != ''">
|
|
|
|
|
+ AND OD.AGENT_ORDER_ID = #{condition}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='payMeans != null and payMeans != ""'>
|
|
|
|
|
+ AND P.PAY_MEANS = #{payMeans}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='orderNm != null and orderNm != ""'>
|
|
|
|
|
+ AND O.ORD_NM = #{orderNm}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='custId != null and custId != ""'>
|
|
|
|
|
+ AND O.CUST_NO = #{custId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='orderPhnno != null and orderPhnno != ""'>
|
|
|
|
|
+ AND O.ORD_PHNNO = #{orderPhnno}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='goodsCd != null and goodsCd != ""'>
|
|
|
|
|
+ AND G1.GOODS_CD = #{goodsCd}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='sizeCd != null and sizeCd != ""'>
|
|
|
|
|
+ AND ODI.OPT_CD2 = #{sizeCd}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='goodsNm != null and goodsNm != ""'>
|
|
|
|
|
+ AND G1.GOODS_NM = #{goodsNm}
|
|
|
|
|
+ </if>
|
|
|
<if test='payMeans != null and payMeans != ""'>
|
|
<if test='payMeans != null and payMeans != ""'>
|
|
|
AND P.PAY_MEANS = #{payMeans}
|
|
AND P.PAY_MEANS = #{payMeans}
|
|
|
</if>
|
|
</if>
|
|
@@ -68,14 +128,14 @@
|
|
|
<if test='orderPhnno != null and orderPhnno != ""'>
|
|
<if test='orderPhnno != null and orderPhnno != ""'>
|
|
|
AND O.ORD_PHNNO = #{orderPhnno}
|
|
AND O.ORD_PHNNO = #{orderPhnno}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test='goodsCd != null and goodsCd != ""'>
|
|
|
|
|
- AND G1.GOODS_CD = #{goodsCd}
|
|
|
|
|
|
|
+ <if test='goodsCd != null and goodsCd != ""'>
|
|
|
|
|
+ AND G2.GOODS_CD = #{goodsCd}
|
|
|
</if>
|
|
</if>
|
|
|
<if test='sizeCd != null and sizeCd != ""'>
|
|
<if test='sizeCd != null and sizeCd != ""'>
|
|
|
AND ODI.OPT_CD2 = #{sizeCd}
|
|
AND ODI.OPT_CD2 = #{sizeCd}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test='goodsNm != null and goodsNm != ""'>
|
|
|
|
|
- AND G1.GOODS_NM = #{goodsNm}
|
|
|
|
|
|
|
+ <if test='goodsNm != null and goodsNm != ""'>
|
|
|
|
|
+ AND G2.GOODS_NM = #{goodsNm}
|
|
|
</if>
|
|
</if>
|
|
|
<if test='recipNm != null and recipNm != ""'>
|
|
<if test='recipNm != null and recipNm != ""'>
|
|
|
AND DA.RECIP_NM = #{recipNm}
|
|
AND DA.RECIP_NM = #{recipNm}
|
|
@@ -174,6 +234,18 @@
|
|
|
AND P.PAY_GB = 'O'
|
|
AND P.PAY_GB = 'O'
|
|
|
INNER JOIN TB_DELIVERY_ADDR DA
|
|
INNER JOIN TB_DELIVERY_ADDR DA
|
|
|
ON OD.DELV_ADDR_SQ = DA.DELV_ADDR_SQ
|
|
ON OD.DELV_ADDR_SQ = DA.DELV_ADDR_SQ
|
|
|
|
|
+ LEFT OUTER JOIN (
|
|
|
|
|
+ SELECT OC.WD_INVOICE_NO
|
|
|
|
|
+ , OC.WD_INVOICE_SEND_YN
|
|
|
|
|
+ , OC.SHIP_COMP_CD
|
|
|
|
|
+ , OCD.ORD_DTL_NO
|
|
|
|
|
+ , OCD.CHG_QTY
|
|
|
|
|
+ , OCD.CHG_STAT
|
|
|
|
|
+ FROM TB_ORDER_CHANGE OC
|
|
|
|
|
+ INNER JOIN TB_ORDER_CHANGE_DETAIL OCD
|
|
|
|
|
+ ON OC.ORD_CHG_SQ = OCD.ORD_CHG_SQ
|
|
|
|
|
+ ) OCD
|
|
|
|
|
+ ON OD.ORD_DTL_NO = OCD.ORD_DTL_NO
|
|
|
WHERE 1=1
|
|
WHERE 1=1
|
|
|
<if test='siteCd != null and siteCd != ""'>
|
|
<if test='siteCd != null and siteCd != ""'>
|
|
|
AND O.SITE_CD = #{siteCd}
|
|
AND O.SITE_CD = #{siteCd}
|
|
@@ -196,6 +268,22 @@
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="multiOrdDtlStat == null or multiOrdDtlStat == ''">
|
|
|
|
|
+ <if test="multiOrdStat != null and multiOrdStat != ''">
|
|
|
|
|
+ AND OD.ORD_DTL_STAT IN
|
|
|
|
|
+ <foreach collection="multiOrdStat" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="chgStat != null and chgStat != ''">
|
|
|
|
|
+ AND OCD.CHG_STAT = #{chgStat}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="chgStat == null or chgStat == ''">
|
|
|
|
|
+ <if test="chgGb != null and chgGb != ''">
|
|
|
|
|
+ AND OCD.CHG_STAT = #{chgGb}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
<if test='search != null and search == "searchOrdNo"'>
|
|
<if test='search != null and search == "searchOrdNo"'>
|
|
|
<if test="condition != null and condition != ''">
|
|
<if test="condition != null and condition != ''">
|
|
|
AND O.ORD_NO = #{condition}
|
|
AND O.ORD_NO = #{condition}
|
|
@@ -203,7 +291,12 @@
|
|
|
</if>
|
|
</if>
|
|
|
<if test='search != null and search == "searchExtmallOrderId"'>
|
|
<if test='search != null and search == "searchExtmallOrderId"'>
|
|
|
<if test="condition != null and condition != ''">
|
|
<if test="condition != null and condition != ''">
|
|
|
- AND O.ORD_NO = #{condition}
|
|
|
|
|
|
|
+ AND OD.EXTMALL_ORDER_ID = #{condition}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='search != null and search == "searchAgentOrderId"'>
|
|
|
|
|
+ <if test="condition != null and condition != ''">
|
|
|
|
|
+ AND OD.AGENT_ORDER_ID = #{condition}
|
|
|
</if>
|
|
</if>
|
|
|
</if>
|
|
</if>
|
|
|
<if test='payMeans != null and payMeans != ""'>
|
|
<if test='payMeans != null and payMeans != ""'>
|
|
@@ -227,28 +320,6 @@
|
|
|
<if test='goodsNm != null and goodsNm != ""'>
|
|
<if test='goodsNm != null and goodsNm != ""'>
|
|
|
AND G1.GOODS_NM = #{goodsNm}
|
|
AND G1.GOODS_NM = #{goodsNm}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test='multiBrand != null and multiBrand != ""'>
|
|
|
|
|
- AND G2.BRAND_CD IN
|
|
|
|
|
- <foreach collection="multiBrand" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
|
- #{item}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="multiOrdDtlStat != null and multiOrdDtlStat != ''">
|
|
|
|
|
- AND OD.ORD_DTL_STAT IN
|
|
|
|
|
- <foreach collection="multiOrdDtlStat" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
|
- #{item}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test='search != null and search == "searchOrdNo"'>
|
|
|
|
|
- <if test="condition != null and condition != ''">
|
|
|
|
|
- AND O.ORD_NO = #{condition}
|
|
|
|
|
- </if>
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test='search != null and search == "searchExtmallOrderId"'>
|
|
|
|
|
- <if test="condition != null and condition != ''">
|
|
|
|
|
- AND O.ORD_NO = #{condition}
|
|
|
|
|
- </if>
|
|
|
|
|
- </if>
|
|
|
|
|
<if test='payMeans != null and payMeans != ""'>
|
|
<if test='payMeans != null and payMeans != ""'>
|
|
|
AND P.PAY_MEANS = #{payMeans}
|
|
AND P.PAY_MEANS = #{payMeans}
|
|
|
</if>
|
|
</if>
|