فهرست منبع

주문목록 수정중

jsh77b 5 سال پیش
والد
کامیت
b793cc477d

+ 16 - 1
style24.admin/src/main/java/com/style24/admin/biz/web/TsaOrderController.java

@@ -72,6 +72,7 @@ public class TsaOrderController extends TsaBaseController {
 		mav.addObject("siteCdList"		, rendererService.getAvailCommonCodeList("G012"));		// 사이트구분
 		mav.addObject("mallGbList"		, rendererService.getAvailCommonCodeList("G011"));		// 몰구분		
 		mav.addObject("supplyCompList"	, rendererService.getSupplyCompanyList());				// 공급업제목록
+		mav.addObject("ordStatList"		, rendererService.getAvailCommonCodeList("G012"));		// 주문상태코드
 		mav.addObject("ordDtlStatList"	, rendererService.getAvailCommonCodeList("G013"));		// 주문상세상태코드
 		
 		mav.addObject("chgStatList"		, rendererService.getAvailCommonCodeList("G685"));		// 주문변경요청상태코드
@@ -99,7 +100,21 @@ public class TsaOrderController extends TsaBaseController {
 		GagaMap result = new GagaMap();
 		
 		order.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
-		order.setPageable(new TsaPageRequest(order.getPageNo() - 1, order.getPageSize()));
+		order.setPageable(new TsaPageRequest(order.getPageNo() - 1, order.getPageSize()));
+		
+		// 주문상태 CD_GB 변경
+		if (order.getMultiOrdStat() != null) {
+			for (int i=0 ; i<order.getMultiOrdStat().length ; i++) {
+				String ordStat = order.getMultiOrdStat()[i].replace("G012", "G013"); 
+				order.getMultiOrdStat()[i] = ordStat;
+			}
+		}
+		
+		// 주문취소상태 CD_GB 변경
+		if (order.getChgGb() != null) {
+			String chgDtlStat = order.getChgGb().replace("G680", "G685"); 
+			order.setChgGb(chgDtlStat);
+		}
 		
 		// 주문전체건수 조회
 		int totalCount = orderService.getOrderListCount(order);

+ 101 - 30
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaOrder.xml

@@ -24,6 +24,18 @@
 		AND    P.PAY_GB = 'O'
 		INNER  JOIN TB_DELIVERY_ADDR DA
 		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
 		<if test='siteCd != null and siteCd != ""'>
 		AND    O.SITE_CD = #{siteCd}
@@ -34,8 +46,8 @@
 		<if test='supplyCompCd != null and supplyCompCd != ""'>
 		AND    OD.SUPPLY_COMP_CD = #{supplyCompCd}
 		</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=",">
         		#{item}
             </foreach>
@@ -46,6 +58,28 @@
         		#{item}
             </foreach>
         </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="condition != null and condition != ''">
 		AND    O.ORD_NO = #{condition}
@@ -53,9 +87,35 @@
 		</if>
 		<if test='search != null and search == "searchExtmallOrderId"'>
         	<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 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 != ""'>
 		AND    P.PAY_MEANS = #{payMeans}
 		</if>
@@ -68,14 +128,14 @@
 		<if test='orderPhnno != null and orderPhnno != ""'>
 		AND    O.ORD_PHNNO = #{orderPhnno}
 		</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 test='sizeCd != null and sizeCd != ""'>
 		AND    ODI.OPT_CD2 = #{sizeCd}
 		</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 test='recipNm != null and recipNm != ""'>
 		AND    DA.RECIP_NM = #{recipNm}
@@ -174,6 +234,18 @@
 				AND    P.PAY_GB = 'O'
 				INNER  JOIN TB_DELIVERY_ADDR DA
 				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
 				<if test='siteCd != null and siteCd != ""'>
 				AND    O.SITE_CD = #{siteCd}
@@ -196,6 +268,22 @@
 		        		#{item}
 		            </foreach>
 		        </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="condition != null and condition != ''">
 				AND    O.ORD_NO = #{condition}
@@ -203,7 +291,12 @@
 				</if>
 				<if test='search != null and search == "searchExtmallOrderId"'>
 		        	<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 test='payMeans != null and payMeans != ""'>
@@ -227,28 +320,6 @@
 				<if test='goodsNm != null and goodsNm != ""'>
 				AND    G1.GOODS_NM = #{goodsNm}
 				</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 != ""'>
 				AND    P.PAY_MEANS = #{payMeans}
 				</if>

+ 24 - 7
style24.admin/src/main/webapp/WEB-INF/views/order/OrderListForm.html

@@ -90,8 +90,21 @@
 						</td>
 					</tr>
 					<tr>
+						<th>주문상태</th>
+						<td>
+							<div class="multiCheckBox" style="width:270px">
+								<button type="button" class="sltBtn" style="overflow-x: hidden; padding-right:5px;">[전체]</button>
+								<ul style="display: none; box-shadow: 3px 3px 3px; overflow-y: scroll; height: 112px;">
+									<li th:if="${ordStatList}" th:each="oneData, status : ${ordStatList}">
+										<label class="chkBox">
+											<input type="checkbox" name="multiOrdStat" th:value="${oneData.cd}" th:text="|[${oneData.cd}] ${oneData.cdNm}|">
+										</label>
+									</li>
+								</ul>
+							</div>
+						</td>
 						<th>주문상세상태</th>
-						<td colspan="5">
+						<td colspan="3">
 							<div class="multiCheckBox" style="width:270px">
 								<button type="button" class="sltBtn" style="overflow-x: hidden; padding-right:5px;">[전체]</button>
 								<ul style="display: none; box-shadow: 3px 3px 3px; overflow-y: scroll; height: 112px;">
@@ -108,12 +121,13 @@
 							<select name="search" id="search">
 								<option value="searchOrdNo">주문번호</option>
 								<option value="searchExtmallOrderId">외부몰주문번호</option>
+								<option value="searchAgentOrderId">에이전트주문번호</option>
 							</select>
 							<textarea class="textareaR3 w70p" name="condition" id="condition"></textarea>
 						</td>
 					</tr>
 					<tr>
-						<th>@변경구분</th>
+						<th>변경구분</th>
 						<td>
 							<select name="chgGb">
 								<option value="">[전체]</option>
@@ -274,11 +288,14 @@ var columnDefsOrderList = [
 				, field			: 'ordNo'
 				, width			: 75
 				, cellClass		: 'text-center'
-				, rowSpan		: function(params) {
-					return 2;
-				}
-				, cellClassRules: {
-					'cell-span': 'value !== undefined'
+				, sortable		: true
+				, cellRenderer	: function (params) {
+					var roleCd = [[${sessionInfo.roleCd}]];
+					if (!roleCd.startsWith("C")) {
+						return "<a href=\"javascript:void(0);\" onclick=\"fnOpenOrderDetailPopup('" + params.value + "');\">" + params.value + "</a>";
+					} else {
+						return params.value;
+					}
 				}
 			},
 			{