tsit05 4 anni fa
parent
commit
9480ab81bc

+ 22 - 1
src/main/java/com/style24/admin/biz/dao/TsaWithdrawDao.java

@@ -120,7 +120,7 @@ public interface TsaWithdrawDao {
 	Collection<Withdraw> getWithdrawDirectiveList(Withdraw withdraw);
 	
 	/**
-	 * 재회수지시
+	 * 재회수지시 detail
 	 * 
 	 * @param Withdraw
 	 * @return 
@@ -129,6 +129,16 @@ public interface TsaWithdrawDao {
 	 */
 	void updateReRecallOrder(Withdraw withdraw);
 	
+	/**
+	 * 재회수지시
+	 * 
+	 * @param Withdraw
+	 * @return 
+	 * @author moon
+	 * @since 2021. 05. 11
+	 */
+	void updateReRecallOrderChange(Withdraw withdraw);
+	
 	/**
 	 * 주문변경사유 변경
 	 * 
@@ -149,6 +159,17 @@ public interface TsaWithdrawDao {
 	 */
 	void updateChangeStat(WithdrawExc withdrawExc);
 	
+	/**
+	 * 주문변경번호상세 조회 
+	 * 
+	 * @param Withdraw
+	 * @return Collection<Withdraw>
+	 * @author moon
+	 * @since 2021. 06. 24
+	 */
+	Collection<Withdraw> getOrdChgDtlList(Withdraw withdraw);
+	
+	
 	
 	/**
 	 * 회수등록 - 조회(송장번호용)

+ 10 - 0
src/main/java/com/style24/admin/biz/dao/TsaWmsWithdrawDao.java

@@ -5,6 +5,7 @@ import java.util.Collection;
 import org.springframework.dao.DataAccessException;
 
 import com.style24.persistence.domain.WmsWithdraw;
+import com.style24.persistence.domain.Withdraw;
 import com.style24.persistence.domain.Delivery;
 import com.style24.core.support.annotation.WmsDs;
 import org.springframework.stereotype.Repository;
@@ -60,5 +61,14 @@ public interface TsaWmsWithdrawDao {
 	 */
 	void deleteWmsTbIfDelifixQty(Delivery delivery);
 	
+	/**
+	 *  재회수지시
+	 * 
+	 * @param WmsWithdraw
+	 * @return int
+	 * @author moon
+	 * @since 2021. 06. 24
+	 */
+	void updateReRecallOrder(Withdraw withdraw);
 	
 }

+ 23 - 10
src/main/java/com/style24/admin/biz/service/TsaWithdrawService.java

@@ -11,6 +11,7 @@ import com.gagaframework.web.parameter.GagaMap;
 import com.style24.admin.biz.dao.TsaDeliveryDao;
 import com.style24.admin.biz.dao.TsaWithdrawDao;
 import com.style24.admin.support.security.session.TsaSession;
+import com.style24.admin.biz.service.TsaWmsWithdrawService;
 import com.style24.core.biz.dao.TscOrderChangeDao;
 import com.style24.core.biz.service.TscOrderChangeService;
 import com.style24.core.biz.service.TscOrderRefundService;
@@ -57,8 +58,8 @@ public class TsaWithdrawService {
 	@Autowired
 	private TscOrderChangeService orderChangeService;
 	
-	//@Autowired
-	//private TsaOrderDao orderDao;
+	@Autowired
+	private TsaWmsWithdrawService wmsWithdrawService;
 
 	//@Autowired
 	//private TsaOrderService orderService;
@@ -241,6 +242,10 @@ public class TsaWithdrawService {
 	public void reRecallOrder(Withdraw withdraw) {
 		Integer userNo = TsaSession.getInfo().getUserNo();
 		withdraw.setUpdNo(userNo);
+		
+		withdrawDao.updateReRecallOrderChange(withdraw);
+		
+		
 		if(OrderChangeGb.RETURN.value().equals(withdraw.getChgGb())) { // 반품요청
 			withdraw.setChgStat(OrderChangeStat.RETURN.value()); // 반품접수
 		} else { //교환요청
@@ -248,14 +253,22 @@ public class TsaWithdrawService {
 		}
 		withdrawDao.updateReRecallOrder(withdraw);
 		
-		// 주문상세변경 이력 
-		OrderChange ordChg = new OrderChange();
-		ordChg.setRegNo(userNo);
-		ordChg.setUpdNo(userNo);
-		ordChg.setOrdChgSq(withdraw.getOrdChgSq()); 
-		ordChg.setOrdDtlNo(withdraw.getOrdDtlNo()); 
-		ordChg.setChgStat(withdraw.getChgStat());
-		orderChangeDao.createOrderChangeDetailHst(ordChg);
+		// 상세목록 조회 
+		Collection<Withdraw> list = withdrawDao.getOrdChgDtlList(withdraw);
+		
+		for(Withdraw data : list) {
+			// 주문상세변경 이력 
+			OrderChange ordChg = new OrderChange();
+			ordChg.setRegNo(userNo);
+			ordChg.setUpdNo(userNo);
+			ordChg.setOrdChgSq(data.getOrdChgSq()); 
+			ordChg.setOrdDtlNo(data.getOrdDtlNo()); 
+			ordChg.setChgStat(data.getChgStat());
+			orderChangeDao.createOrderChangeDetailHst(ordChg);
+		}
+		
+		// WMS 재회수지시 
+		wmsWithdrawService.updateReRecallOrder(withdraw);
 		
 	}
 	

+ 15 - 0
src/main/java/com/style24/admin/biz/service/TsaWmsWithdrawService.java

@@ -8,6 +8,7 @@ import org.springframework.transaction.annotation.Transactional;
 import lombok.extern.slf4j.Slf4j;
 import com.style24.admin.biz.dao.TsaWmsWithdrawDao;
 import com.style24.persistence.domain.WmsWithdraw;
+import com.style24.persistence.domain.Withdraw;
 import com.style24.persistence.domain.Delivery;
 import com.style24.core.support.message.TscMessageByLocale;
 
@@ -78,4 +79,18 @@ public class TsaWmsWithdrawService {
 		wmsWithdrawDao.deleteWmsTbIfDelifixQty(delivery);
 	}
 	
+	/**
+	 * 재회수지시 
+	 *
+	 * @param Delivery
+	 * @return
+	 * @author moon
+	 * @since 2021. 06. 24
+	 */
+	@Transactional("wmsTxnManager")
+	public void updateReRecallOrder(Withdraw withdraw) {
+		wmsWithdrawDao.updateReRecallOrder(withdraw);
+	}
+	
+	
 }

+ 24 - 5
src/main/java/com/style24/persistence/mybatis/shop/TsaWithdraw.xml

@@ -363,7 +363,7 @@
 				<include refid="getListPagingCondition_sql"/>
 	</select>
 
-    <!-- 환불관리 목록 조회 조건  -->
+    <!-- 회수지시 목록 조회 조건  -->
 	<sql id="getWithdrawDirectiveCondition_sql">
 		<if test="ordNm != null and ordNm != ''">
 			AND O.ORD_NM = #{ordNm}
@@ -405,7 +405,7 @@
 		AND    OCD.DEL_YN      = 'N'	
 	</sql>		
 			
-	<!-- 재회수지시-->
+	<!-- 재회수지시 Detail-->
 	<update id="updateReRecallOrder" parameterType="Withdraw" >
 		/* TsaWithdraw.updateReRecallOrder */
 		UPDATE TB_ORDER_CHANGE_DETAIL SET
@@ -413,11 +413,20 @@
 		, UPD_NO   = #{updNo}
 		, UPD_DT   = NOW()
 		WHERE ORD_CHG_SQ = #{ordChgSq} 
-		  AND ORD_DTL_NO = #{ordDtlNo}
-
 	</update>
 
+	<!-- 재회수지시 -->
+	<update id="updateReRecallOrderChange" parameterType="Withdraw" >
+		/* TsaWithdraw.updateReRecallOrderChange */
+		UPDATE TB_ORDER_CHANGE SET 
+			  WD_SHIP_STATE = '99'
+			, UPD_NO        = #{updNo}
+			, UPD_DT        = NOW()
+		WHERE ORD_CHG_SQ = #{ordChgSq} 
+
 
+	</update>
+	
 	<!-- 회수예외 사유변경 목록 -->
 	<select id="getWithdrawExceptionChangeList" parameterType="WithdrawExc" resultType="WithdrawExc">
 		/* TsaWithdraw.getWithdrawExceptionChangeList */
@@ -528,6 +537,16 @@
 		   AND B.CHG_STAT IN('G685_33','G685_60')		
 	</select>	
 	
-	
+	<!-- 주문변경번호 상세 조회  -->
+	<select id="getOrdChgDtlList" parameterType="Withdraw" resultType="Withdraw">
+		/* TsaWithdraw.getOrdChgDtlList */
+		SELECT  
+			  ORD_CHG_SQ 
+			, ORD_DTL_NO 
+			, CHG_STAT 
+		FROM TB_ORDER_CHANGE_DETAIL
+		WHERE ORD_CHG_SQ = 980
+		  AND DEL_YN     = 'N'
+	</select>	
 		
 </mapper>

+ 12 - 1
src/main/java/com/style24/persistence/mybatis/wms/TsaWmsWithdraw.xml

@@ -140,7 +140,18 @@
 		  AND OrderDtlNo = #{ordDtlNo}
 	</delete>		
 	
-	
+	<!-- 재회수지시      -->
+	<insert id="updateReRecallOrder" parameterType="Withdraw" >
+		/*TsaWmsWithdraw.updateReRecallOrder*/
+		UPDATE ISTYLE24_WMSIF.DBO.TB_IF_RECALLDELIVERY SET 
+		  IsDeleted   = 1
+		, DateDeleted = GETDATE() 
+		WHERE OrderExceptionNo  =  #{ordChgSq}
+		  AND OrderNo           =  #{ordNo}
+          and IfStat in ('0','1')
+          and IsDeleted = 0
+          		  
+	</insert>	
 	
 	
 </mapper>

+ 53 - 51
src/main/webapp/WEB-INF/views/customer/LmsPopupForm.html

@@ -14,59 +14,61 @@
  * 1.0  2021.01.21   jsshin     최초 작성
  *******************************************************************************
  -->
-<div class="modelessPopup" data-width="800">
-	<div class="panelStyle">
-		<!-- TITLE -->
-		<div class="panelTitle">
-			<strong>LMS 발송</strong>
-			<button type="button" class="close" onclick="uifnPopupClose('popupLmsForm')"><em class="fa fa-times"></em></button>
-		</div>
-		<!-- //TITLE -->
-		<!-- CONTENT -->
-		<div class="panelContent">
-			<form id="lmsForm" name="lmsForm">
-				<table class="frmStyle">
-					<colgroup>
-						<col style="width:1%"/>
-						<col style="width:40%"/>
-					</colgroup>
-					<tbody>
-					<tr >
-						<th>수신자번호<em class="required" title="필수"></em></th>
-						<td th:if="${maskingCellPhnno == ''}">
-							<input type="text" class="w150" name="cellPhnno" data-valid-name="수신번호"  required="required"  maxlength="13" readonly="readonly"/>
-						</td>
-						<td th:unless="${maskingCellPhnno == ''}">
-							<input type="hidden" name="cellPhnno"/>
-							<input type="text" class="w150" name="maskingCellPhnno" readonly="readonly"/>
-						</td>
-					</tr>
-					<tr>
-						<th>발신자번호<em class="required" title="필수"></em></th>
-						<td>
-							<input type="text" class="w150" name="callBack" th:value="${callBack}" maxlength="11" readonly="readonly"/>
-						</td>
-					</tr>
-					<tr>
-						<th>메시지<em class="required" title="필수"></em></th>
-						<td>
-							<textarea class="textareaR4"  style="resize: none;" name ="content" ></textarea>
-							<span name="count">0</span> / 2000 byte
-						</td>
-					</tr>
-					</tbody>
-				</table>
-			</form>
+
+	<div class="modelessPopup draggable" data-width="800">
+		<div class="panelStyle">
+			<!-- TITLE -->
+			<div class="panelTitle">
+				<strong>LMS 발송</strong>
+				<button type="button" class="close" onclick="uifnPopupClose('popupLmsForm')"><em class="fa fa-times"></em></button>
+			</div>
+			<!-- //TITLE -->
+			<!-- CONTENT -->
+			<div class="panelContent">
+				<form id="lmsForm" name="lmsForm">
+					<table class="frmStyle">
+						<colgroup>
+							<col style="width:1%"/>
+							<col style="width:40%"/>
+						</colgroup>
+						<tbody>
+						<tr >
+							<th>수신자번호<em class="required" title="필수"></em></th>
+							<td th:if="${maskingCellPhnno == ''}">
+								<input type="text" class="w150" name="cellPhnno" data-valid-name="수신번호"  required="required"  maxlength="13" readonly="readonly"/>
+							</td>
+							<td th:unless="${maskingCellPhnno == ''}">
+								<input type="hidden" name="cellPhnno"/>
+								<input type="text" class="w150" name="maskingCellPhnno" readonly="readonly"/>
+							</td>
+						</tr>
+						<tr>
+							<th>발신자번호<em class="required" title="필수"></em></th>
+							<td>
+								<input type="text" class="w150" name="callBack" th:value="${callBack}" maxlength="11" readonly="readonly"/>
+							</td>
+						</tr>
+						<tr>
+							<th>메시지<em class="required" title="필수"></em></th>
+							<td>
+								<textarea class="textareaR4"  style="resize: none;" name ="content" ></textarea>
+								<span name="count">0</span> / 2000 byte
+							</td>
+						</tr>
+						</tbody>
+					</table>
+				</form>
+			</div>
+			<ul class="panelBar">
+				<li class="right">
+					<button type="button" class="btn btn-success btn-lg" id="btnSendSms">발송</button>
+					<button type="button" class="btn btn-gray btn-lg" onclick="uifnPopupClose('popupLmsForm')">취소</button>
+				</li>
+			</ul>
+			<!-- //CONTENT -->
 		</div>
-		<ul class="panelBar">
-			<li class="right">
-				<button type="button" class="btn btn-success btn-lg" id="btnSendSms">발송</button>
-				<button type="button" class="btn btn-gray btn-lg" onclick="uifnPopupClose('popupLmsForm')">취소</button>
-			</li>
-		</ul>
-		<!-- //CONTENT -->
 	</div>
-</div>
+
 <script th:inline="javascript">
 	/*<![CDATA[*/
 	const elementCellPhnno = [[${elementCellPhnno}]];