소스 검색

Merge branch 'develop' of http://112.172.147.34:4936/style24/style24.admin into develop

jsshin 4 년 전
부모
커밋
af5f924b59

+ 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>

+ 8 - 7
src/main/webapp/WEB-INF/views/board/NoticeForm.html

@@ -205,8 +205,8 @@
 		<!-- 등록/수정 -->
 	</div>
 
-<script type="text/javascript" src="/ux/plugins/summernote/summernote.js?v=2020103001"></script>
-<script type="text/javascript" src="/ux/plugins/gaga/gaga.summernote.js?v=2021053101"></script>
+<!-- <script type="text/javascript" src="/ux/plugins/summernote/summernote.js?v=2020103001"></script>
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.summernote.js?v=2021053101"></script> -->
 <script th:inline="javascript">
 /*<![CDATA[*/
 	// 공지사항유형(10:사이트공지, 20:내부공지)
@@ -343,7 +343,8 @@
 		}
 
 		// 공지내용. Summernote에 값 세팅
-		gagaSn.setContents('#noticeContent', event.data.noticeContent);
+		//gagaSn.setContents('#noticeContent', event.data.noticeContent);
+		$('#detailForm textarea[name=noticeContent]').val(event.data.noticeContent);
 
 		// 수신자 목록
 		fnGetNoticeReceiverList(event.data.noticeSq);
@@ -481,8 +482,8 @@
 		$('#detailForm input[name=noticeSq]').val('');
 		$('#detailForm input[name=noticeStdt]').val(_today);
 		$('#detailForm input[name=noticeEddt]').val(_today);
-		
-		gagaSn.setContents('#noticeContent', ''); 
+		$('#detailForm input[name=noticeContent]').val('');
+		//gagaSn.setContents('#noticeContent', ''); 
 	});
 	
 	// 저장
@@ -618,8 +619,8 @@
 		gagaAgGrid.createGrid('gridList', gridOptions);
 		
 		// Create a summernote
-		let snOptions = gagaSn.getToolbarOptions();
-		gagaSn.createSummernote(snOptions, '#noticeContent');
+		//let snOptions = gagaSn.getToolbarOptions();
+		//gagaSn.createSummernote(snOptions, '#noticeContent');
 		
 		$("#fileCnt").trigger('change');
 	});

+ 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}]];

+ 26 - 3
src/main/webapp/WEB-INF/views/withdraw/WithdrawDirectiveListForm.html

@@ -185,13 +185,21 @@
 		{headerName: "미회수사유", 	field: "wdReasonCdNm", 	width: 100, cellClass: "text-center"},
 		{headerName: "재회수지시", 	field: "wdShipState", 		width: 100,	cellClass: 'text-center',
 			cellRenderer: function(params) {
-				return params.value == '12' && params.data.chgStat == 'G685_30' ? '<button type="button" class="btn btn-base btn-sm" onclick="fnReRecallOrder(\'' + params.data.chgGb + '\',\'' + params.data.ordDtlNo + '\',\''+params.data.ordChgSq+'\');">&nbsp;재회수지시&nbsp;</button>' : "";
+				return params.value == '12' && params.data.chgStat == 'G685_30' ? '<button type="button" class="btn btn-base btn-sm" onclick="fnReRecallOrder(\'' + params.data.chgGb + '\',\'' + params.data.ordDtlNo + '\',\''+params.data.ordChgSq+'\',\''+params.data.ordNo+'\');">&nbsp;재회수지시&nbsp;</button>' : "";
 			}
 		},	
 		{headerName: "교환선발송여부 ", 	field: "wdBfSendYn", 	width: 110, cellClass: "text-center"},
 		{headerName: "배송시작일시", 	field: "wdStdt", 		width: 120, cellClass: "text-center"},
 		{headerName: "배송종료일시", 	field: "wdEddt", 		width: 120, cellClass: "text-center"},
 		{headerName: "수취인명", 		field: "recipNm", 		width: 120, cellClass: "text-center"},
+		
+		{headerName: "LMS", 			field: "chgerPhnno", 	width: 120, cellClass: "text-center",
+			cellRenderer: function(params) {
+				return '<button type="button" class="btn btn-base btn-sm" onclick="fnLms(\'' + params.data.chgGb + '\',\'' + params.data.ordDtlNo + '\',\''+params.data.ordChgSq+'\',\''+params.data.ordNo+'\');">&nbsp;LMS&nbsp;</button>';
+			}			
+		},
+		
+		
 		{headerName: "변경자명", 		field: "chgerNm", 		width: 100, cellClass: "text-center"},
 		{headerName: "변경자휴대전화", 	field: "chgerPhnno", 	width: 120, cellClass: "text-center"},
 		{headerName: "변경자전화번호", 	field: "chgerTelno", 	width: 120, cellClass: "text-center"},
@@ -295,7 +303,7 @@
 	/*************************************************************************
 	*  재회수지시
 	**************************************************************************/	
-	var fnReRecallOrder = function(chgGb, ordDtlNo,ordChgSq ){
+	var fnReRecallOrder = function(chgGb, ordDtlNo, ordChgSq, ordNo ){
 		mcxDialog.confirm("재회수지시 하시겠습니까?", {
 		    cancelBtnText: "취소",
 		    sureBtnText: "확인",
@@ -303,6 +311,7 @@
 	            var param = new Object;
 	            param.chgGb    = chgGb;
 	            param.ordDtlNo = ordDtlNo;
+	            param.ordNo    = ordNo;
 	            param.ordChgSq = ordChgSq;
 	            var jsonData = JSON.stringify(param);
 	            gagajf.ajaxJsonSubmit('/withdraw/direct/recallorder', jsonData, fnSearchList);
@@ -310,9 +319,23 @@
 		});
 	}
 
+	/*************************************************************************
+	*  LMS
+	**************************************************************************/	
+	var fnLms = function(){
+		let param = {};
+		param.elementCellPhnno = '01040161558'; //'#custInfoForm input[name=cellPhnno]';
+		param.elementCustNo =    '100025';// '#custInfoForm input[name=custNo]';
+		param.elementMaskingCellPhnno = '01040161558'; //  '#custInfoForm input[name=maskingCellPhnno]';
+
+		cfnOpenLmsPopup(param);
+	}
+
+	
+	
 	//엑셀다운로드
 	$('#btnExcel').on('click', function() {
-		gagaAgGrid.exportToExcel('회수지시 목록', gridOptions);
+
 		
 		var totalRows = gridOptions.api.getDisplayedRowCount();
 		if(totalRows==0){