|
|
@@ -163,61 +163,49 @@ public class TsaOrderChangeController extends TsaBaseController {
|
|
|
}
|
|
|
|
|
|
GagaMap map = new GagaMap();
|
|
|
-
|
|
|
- List<Order> cnclReqList = cnclReq.getCancelReqList(); // 변경요청정보
|
|
|
- int[] ordDtlNoArr = new int[cnclReqList.size()];
|
|
|
- int[] cnclRtnReqQtyArr = new int[cnclReqList.size()];
|
|
|
-
|
|
|
- for (int i=0 ; i<cnclReqList.size() ; i++) {
|
|
|
- Order vo = (Order)cnclReqList.get(i);
|
|
|
- ordDtlNoArr[i] = vo.getOrdDtlNo();
|
|
|
- cnclRtnReqQtyArr[i] = vo.getOrdCanChgQty();
|
|
|
- }
|
|
|
|
|
|
// 1. 세션회원조회
|
|
|
int userNo = TsaSession.getInfo().getUserNo();
|
|
|
-
|
|
|
- cnclReq.setOrdDtlNoArr(ordDtlNoArr);
|
|
|
- cnclReq.setCnclRtnReqQtyArr(cnclRtnReqQtyArr);
|
|
|
+
|
|
|
cnclReq.setIpAddress(TsaSession.getIpAddress());
|
|
|
cnclReq.setRegNo(userNo);
|
|
|
|
|
|
// 2021.05.14 FRONT 정보 선주문정보조회
|
|
|
- GagaMap refundPreInfo = orderChangeService.getRefundPreInfo(cnclReq);
|
|
|
- cnclReqList = (List<Order>) refundPreInfo.get("cnclReqList");
|
|
|
+ GagaMap refundPreInfo = orderChangeService.getRefundPreInfo2(cnclReq);
|
|
|
+ List<Order> cnclReqList = (List<Order>) refundPreInfo.get("cnclReqList");
|
|
|
|
|
|
// 2. 환불금액계산
|
|
|
// 2021.01.19 취소신청정보를 목록 (주문상세번호, 취소/반품수량) 으로 표현
|
|
|
- map = orderRefundService.cnclRtnRefundAmt(cnclReqList);
|
|
|
+ map = orderRefundService.cnclRtnRefundAmt2(cnclReqList);
|
|
|
|
|
|
// 3. 주문변경 기본정보 설정
|
|
|
- map.set("ordNo" , cnclReq.getOrdNo()); // 주문번호
|
|
|
- map.set("ordChgSq" , cnclReq.getOrdChgSq()); // 주문변경번호
|
|
|
- map.set("chgReason" , cnclReq.getChgReason()); // 변경사유
|
|
|
- map.set("chgReasonNm" , cnclReq.getChgReasonNm()); // 변경사유명 (2021.05.13 추가)
|
|
|
- map.set("chgMemo" , cnclReq.getChgMemo()); // 변경메모
|
|
|
- map.set("accountNo" , cnclReq.getAccountNo()); // 환불계좌번호
|
|
|
- map.set("accountNm" , cnclReq.getAccountNm()); // 환불계좌예금주명
|
|
|
- map.set("bankCd" , cnclReq.getBankCd()); // 환불계좌은행코드
|
|
|
- map.set("allCanYnBeforePayment" , cnclReq.getAllCanYnBeforePayment()); // 무통장입금전 전체취소 여부
|
|
|
- map.set("allCanYn" , cnclReq.getAllCanYn()); // 전체취소 여부
|
|
|
- map.set("allLastCanYn" , refundPreInfo.get("allLastCanYn")); // 전체 마지막 취소 여부 (2021.05.13 추가)
|
|
|
- map.set("isCustomer" , cnclReq.getIsCustomer()); // 변경사유 (고객, 회사)
|
|
|
- map.set("chgerNm" , cnclReq.getChgerNm()); // 변경자명
|
|
|
- map.set("chgerEmail" , cnclReq.getChgerEmail()); // 변경자이메일주소
|
|
|
- map.set("chgerPhnno" , cnclReq.getChgerPhnno()); // 변경자핸드폰번호
|
|
|
- map.set("chgerTelno" , cnclReq.getChgerTelno()); // 변경자전화번호
|
|
|
- map.set("reqGbn" , cnclReq.getReqGbn()); // 신청구분
|
|
|
- map.set("ipAddress" , cnclReq.getIpAddress()); // IP주소 (2021.05.13 추가)
|
|
|
- map.set("custNo" , cnclReq.getCustNo()); // 고객번호 (2021.05.13 추가)
|
|
|
-
|
|
|
- map.set("pgTid" , refundPreInfo.getString("pgTid")); // PG거래ID
|
|
|
- map.set("payMeans" , refundPreInfo.getString("payMeans")); // 결제수단
|
|
|
- map.set("pgGb" , refundPreInfo.getString("pgGb")); // PG구분
|
|
|
- map.set("cashAuthNo" , refundPreInfo.getString("cashAuthNo")); // 현금영수증 승인번호
|
|
|
-
|
|
|
- // 5. 부분취소 처리 2021.05.13
|
|
|
- orderChangeService.partialCancel(map, userNo);
|
|
|
+ map.set("ordNo" , cnclReq.getOrdNo()); // 주문번호
|
|
|
+ map.set("ordChgSq" , cnclReq.getOrdChgSq()); // 주문변경번호
|
|
|
+ map.set("chgReason" , cnclReq.getChgReason()); // 변경사유
|
|
|
+ map.set("chgReasonNm" , cnclReq.getChgReasonNm()); // 변경사유명 (2021.05.13 추가)
|
|
|
+ map.set("chgMemo" , cnclReq.getChgMemo()); // 변경메모
|
|
|
+ map.set("accountNo" , cnclReq.getAccountNo()); // 환불계좌번호
|
|
|
+ map.set("accountNm" , cnclReq.getAccountNm()); // 환불계좌예금주명
|
|
|
+ map.set("bankCd" , cnclReq.getBankCd()); // 환불계좌은행코드
|
|
|
+ map.set("allCanYnBeforePayment" , cnclReq.getAllCanYnBeforePayment()); // 무통장입금전 전체취소 여부
|
|
|
+ map.set("allCanYn" , cnclReq.getAllCanYn()); // 전체취소 여부
|
|
|
+ map.set("allLastCanYn" , refundPreInfo.get("allLastCanYn")); // 전체 마지막 취소 여부 (2021.05.13 추가)
|
|
|
+ map.set("isCustomer" , cnclReq.getIsCustomer()); // 변경사유 (고객, 회사)
|
|
|
+ map.set("chgerNm" , cnclReq.getChgerNm()); // 변경자명
|
|
|
+ map.set("chgerEmail" , cnclReq.getChgerEmail()); // 변경자이메일주소
|
|
|
+ map.set("chgerPhnno" , cnclReq.getChgerPhnno()); // 변경자핸드폰번호
|
|
|
+ map.set("chgerTelno" , cnclReq.getChgerTelno()); // 변경자전화번호
|
|
|
+ map.set("reqGbn" , cnclReq.getReqGbn()); // 신청구분
|
|
|
+ map.set("ipAddress" , cnclReq.getIpAddress()); // IP주소 (2021.05.13 추가)
|
|
|
+ map.set("custNo" , cnclReq.getCustNo()); // 고객번호 (2021.05.13 추가)
|
|
|
+
|
|
|
+ map.set("pgTid" , refundPreInfo.getString("pgTid")); // PG거래ID
|
|
|
+ map.set("payMeans" , refundPreInfo.getString("payMeans")); // 결제수단
|
|
|
+ map.set("pgGb" , refundPreInfo.getString("pgGb")); // PG구분
|
|
|
+ map.set("cashAuthNo" , refundPreInfo.getString("cashAuthNo")); // 현금영수증 승인번호
|
|
|
+
|
|
|
+ // 4. 부분취소 처리 2021.05.13
|
|
|
+ orderChangeService.partialCancelTemp(map, userNo);
|
|
|
|
|
|
return super.ok("성공");
|
|
|
}
|
|
|
@@ -236,7 +224,7 @@ public class TsaOrderChangeController extends TsaBaseController {
|
|
|
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
|
- // 반품가능 주문상세상탭값 설정
|
|
|
+ // 1. 반품가능 주문상세상탭값 설정
|
|
|
String[] ordDtlStatArr = new String[3];
|
|
|
ordDtlStatArr[0] = TscConstants.OrderDetailStat.SHIPPING.value();
|
|
|
ordDtlStatArr[1] = TscConstants.OrderDetailStat.SHIP_COMPLETE.value();
|
|
|
@@ -253,7 +241,8 @@ public class TsaOrderChangeController extends TsaBaseController {
|
|
|
mav.addObject("exchangeInfoList" , exchangeInfoList); // 교환정보
|
|
|
}
|
|
|
|
|
|
- // 3. 화면으로 데이타 전송
|
|
|
+ String chgStat = cancelRequestTargetList.get(0).getChgStat();
|
|
|
+
|
|
|
// 2021.01.26 취소요청 화면, 취소요청정보확인 화면 통합
|
|
|
mav.addObject("chgReasonList" , rendererService.getAvailCommonCodeList("G688")); // 취소사유
|
|
|
mav.addObject("cancelRequestTargetList" , cancelRequestTargetList); // 취소요청대상 목록
|
|
|
@@ -261,10 +250,10 @@ public class TsaOrderChangeController extends TsaBaseController {
|
|
|
mav.addObject("ordNo" , order.getOrdNo()); // 주문번호
|
|
|
mav.addObject("ordChgSq" , order.getOrdChgSq()); // 주문변경번호
|
|
|
mav.addObject("orderChangeDetailList" , orderChangeDetailList); // 변경신청목록 (취소/반품/교환)
|
|
|
-
|
|
|
mav.addObject("orderDelvRtnAddrInfo" , orderService.getDeliveryAddrList(order)); // 배송정보
|
|
|
mav.addObject("TelExcNoList" , rendererService.getAvailCommonCodeList("G095")); // 전화번호국번
|
|
|
mav.addObject("PhnExcNoList" , rendererService.getAvailCommonCodeList("G096")); // (휴대전화)번호국번
|
|
|
+ mav.addObject("chgStat" , chgStat); // 변경상태
|
|
|
|
|
|
mav.setViewName("order/RtnReqForm");
|
|
|
|
|
|
@@ -283,69 +272,59 @@ public class TsaOrderChangeController extends TsaBaseController {
|
|
|
@ResponseBody
|
|
|
public GagaResponse rtnReq(@RequestBody OrderChange rtnReq) {
|
|
|
|
|
|
- GagaMap map = new GagaMap();
|
|
|
-
|
|
|
+ // 1. 반품신청정보체크
|
|
|
if (rtnReq== null) {
|
|
|
throw new IllegalStateException(message.getMessage("FAIL_1001"));
|
|
|
}
|
|
|
|
|
|
- List<Order> cnclReqList = rtnReq.getCancelReqList(); // 변경요청정보
|
|
|
- int[] ordDtlNoArr = new int[cnclReqList.size()];
|
|
|
- int[] cnclRtnReqQtyArr = new int[cnclReqList.size()];
|
|
|
-
|
|
|
- for (int i=0 ; i<cnclReqList.size() ; i++) {
|
|
|
- Order vo = (Order)cnclReqList.get(i);
|
|
|
- ordDtlNoArr[i] = vo.getOrdDtlNo();
|
|
|
- cnclRtnReqQtyArr[i] = vo.getOrdCanChgQty();
|
|
|
- }
|
|
|
-
|
|
|
- // 1. 세션회원조회
|
|
|
+ // 2. 관리자정보설정
|
|
|
int userNo = TsaSession.getInfo().getUserNo();
|
|
|
-
|
|
|
- rtnReq.setOrdDtlNoArr(ordDtlNoArr);
|
|
|
- rtnReq.setCnclRtnReqQtyArr(cnclRtnReqQtyArr);
|
|
|
- rtnReq.setIpAddress(TsaSession.getIpAddress());
|
|
|
rtnReq.setRegNo(userNo);
|
|
|
+ rtnReq.setIpAddress(TsaSession.getIpAddress());
|
|
|
|
|
|
// 2021.05.14 FRONT 정보 선주문정보조회
|
|
|
- GagaMap refundPreInfo = orderChangeService.getRefundPreInfo2(rtnReq);
|
|
|
- cnclReqList = (List<Order>) refundPreInfo.get("cnclReqList");
|
|
|
+ GagaMap refundPreInfo = orderChangeService.getRefundPreInfo2(rtnReq);
|
|
|
+ List<Order> cnclReqList = (List<Order>) refundPreInfo.get("cnclReqList");
|
|
|
|
|
|
- // 2. 환불금액계산
|
|
|
+ GagaMap map = new GagaMap();
|
|
|
+
|
|
|
+ // 3. 환불예상금액계산
|
|
|
map = orderRefundService.cnclRtnRefundAmt2(cnclReqList);
|
|
|
|
|
|
- // 3. 주문변경 기본정보 설정
|
|
|
- map.set("ordNo" , rtnReq.getOrdNo()); // 주문번호
|
|
|
- map.set("ordChgSq" , rtnReq.getOrdChgSq()); // 주문변경번호
|
|
|
- map.set("chgReason" , rtnReq.getChgReason()); // 변경사유
|
|
|
- map.set("chgReasonNm" , rtnReq.getChgReasonNm()); // 변경사유명 (2021.05.13 추가)
|
|
|
- map.set("chgMemo" , rtnReq.getChgMemo()); // 변경메모
|
|
|
- map.set("accountNo" , rtnReq.getAccountNo()); // 환불계좌번호
|
|
|
- map.set("accountNm" , rtnReq.getAccountNm()); // 환불계좌예금주명
|
|
|
- map.set("bankCd" , rtnReq.getBankCd()); // 환불계좌은행코드
|
|
|
- map.set("allCanYnBeforePayment" , rtnReq.getAllCanYnBeforePayment()); // 무통장입금전 전체취소 여부
|
|
|
- map.set("allCanYn" , rtnReq.getAllCanYn()); // 전체취소 여부
|
|
|
- map.set("allLastCanYn" , refundPreInfo.get("allLastCanYn")); // 전체 마지막 취소 여부 (2021.05.13 추가)
|
|
|
- map.set("isCustomer" , rtnReq.getIsCustomer()); // 변경사유 (고객, 회사)
|
|
|
- map.set("chgerNm" , rtnReq.getChgerNm()); // 변경자명
|
|
|
- map.set("chgerEmail" , rtnReq.getChgerEmail()); // 변경자이메일주소
|
|
|
- map.set("chgerPhnno" , rtnReq.getChgerPhnno()); // 변경자핸드폰번호
|
|
|
- map.set("chgerTelno" , rtnReq.getChgerTelno()); // 변경자전화번호
|
|
|
- map.set("reqGbn" , rtnReq.getReqGbn()); // 신청구분
|
|
|
- map.set("ipAddress" , rtnReq.getIpAddress()); // IP주소 (2021.05.13 추가)
|
|
|
- map.set("custNo" , rtnReq.getCustNo()); // 고객번호 (2021.05.13 추가)
|
|
|
+ // 4. 주문변경기본정보설정
|
|
|
+ map.set("ordNo" , rtnReq.getOrdNo()); // 주문번호
|
|
|
+ map.set("ordChgSq" , rtnReq.getOrdChgSq()); // 주문변경번호
|
|
|
+ map.set("chgReason" , rtnReq.getChgReason()); // 변경사유
|
|
|
+ map.set("chgReasonNm" , rtnReq.getChgReasonNm()); // 변경사유명 (2021.05.13 추가)
|
|
|
+ map.set("chgMemo" , rtnReq.getChgMemo()); // 변경메모
|
|
|
+ map.set("accountNo" , rtnReq.getAccountNo()); // 환불계좌번호
|
|
|
+ map.set("accountNm" , rtnReq.getAccountNm()); // 환불계좌예금주명
|
|
|
+ map.set("bankCd" , rtnReq.getBankCd()); // 환불계좌은행코드
|
|
|
+ map.set("allCanYnBeforePayment" , rtnReq.getAllCanYnBeforePayment()); // 무통장입금전 전체취소 여부
|
|
|
+ map.set("allCanYn" , rtnReq.getAllCanYn()); // 전체취소 여부
|
|
|
+ map.set("allLastCanYn" , refundPreInfo.get("allLastCanYn")); // 전체 마지막 취소 여부 (2021.05.13 추가)
|
|
|
+ map.set("isCustomer" , rtnReq.getIsCustomer()); // 변경사유 (고객, 회사)
|
|
|
+ map.set("chgerNm" , rtnReq.getChgerNm()); // 변경자명
|
|
|
+ map.set("chgerEmail" , rtnReq.getChgerEmail()); // 변경자이메일주소
|
|
|
+ map.set("chgerPhnno" , rtnReq.getChgerPhnno()); // 변경자핸드폰번호
|
|
|
+ map.set("chgerTelno" , rtnReq.getChgerTelno()); // 변경자전화번호
|
|
|
+ map.set("chgerRtnMemo" , rtnReq.getChgerRtnMemo()); // 변경메모사항
|
|
|
+ map.set("reqGbn" , rtnReq.getReqGbn()); // 신청구분
|
|
|
+ map.set("ipAddress" , rtnReq.getIpAddress()); // IP주소 (2021.05.13 추가)
|
|
|
+ map.set("custNo" , rtnReq.getCustNo()); // 고객번호 (2021.05.13 추가)
|
|
|
+
|
|
|
// 2021.05.24 추가
|
|
|
- map.set("chgerZipcode" , rtnReq.getChgerZipcode()); // 회수지우편번호
|
|
|
- map.set("chgerBaseAddr" , rtnReq.getChgerBaseAddr()); // 회수지기본주소
|
|
|
- map.set("chgerDtlAddr" , rtnReq.getChgerDtlAddr()); // 회수지상세주소
|
|
|
- map.set("wdGb" , rtnReq.getWdGb()); // 회수구분
|
|
|
+ map.set("chgerZipcode" , rtnReq.getChgerZipcode()); // 회수지우편번호
|
|
|
+ map.set("chgerBaseAddr" , rtnReq.getChgerBaseAddr()); // 회수지기본주소
|
|
|
+ map.set("chgerDtlAddr" , rtnReq.getChgerDtlAddr()); // 회수지상세주소
|
|
|
+ map.set("wdGb" , rtnReq.getWdGb()); // 회수구분
|
|
|
|
|
|
- map.set("pgTid" , refundPreInfo.getString("pgTid")); // PG거래ID
|
|
|
- map.set("payMeans" , refundPreInfo.getString("payMeans")); // 결제수단
|
|
|
- map.set("pgGb" , refundPreInfo.getString("pgGb")); // PG구분
|
|
|
- map.set("cashAuthNo" , refundPreInfo.getString("cashAuthNo")); // 현금영수증 승인번호
|
|
|
+ map.set("pgTid" , refundPreInfo.getString("pgTid")); // PG거래ID
|
|
|
+ map.set("payMeans" , refundPreInfo.getString("payMeans")); // 결제수단
|
|
|
+ map.set("pgGb" , refundPreInfo.getString("pgGb")); // PG구분
|
|
|
+ map.set("cashAuthNo" , refundPreInfo.getString("cashAuthNo")); // 현금영수증 승인번호
|
|
|
|
|
|
- // 5. 주문변경 DB 등록 (TB_ORDER_CHANGE, TB_ORDER_CHANGE_DETAIL, TB_REFUND)
|
|
|
+ // 4. 주문변경 DB 등록 (TB_ORDER_CHANGE, TB_ORDER_CHANGE_DETAIL, TB_REFUND)
|
|
|
orderChangeService.returnRequest(map);
|
|
|
|
|
|
return super.ok("성공");
|
|
|
@@ -393,29 +372,13 @@ public class TsaOrderChangeController extends TsaBaseController {
|
|
|
|
|
|
GagaMap mav = new GagaMap();
|
|
|
|
|
|
- List<Order> cnclReqList = (List<Order>)cnclReq.getCancelReqList();
|
|
|
-
|
|
|
- if (cnclReqList == null || cnclReqList.isEmpty()) {
|
|
|
- throw new IllegalStateException(message.getMessage("FAIL_1001"));
|
|
|
- }
|
|
|
-
|
|
|
- int[] ordDtlNoArr = new int[cnclReqList.size()];
|
|
|
- int[] cnclRtnReqQtyArr = new int[cnclReqList.size()];
|
|
|
- for (int i=0 ; i<cnclReqList.size() ; i++) {
|
|
|
- Order vo = (Order)cnclReqList.get(i);
|
|
|
- ordDtlNoArr[i] = vo.getOrdDtlNo();
|
|
|
- cnclRtnReqQtyArr[i] = vo.getOrdCanChgQty();
|
|
|
- }
|
|
|
-
|
|
|
int userNo = TsaSession.getInfo().getUserNo();
|
|
|
- cnclReq.setOrdDtlNoArr(ordDtlNoArr);
|
|
|
- cnclReq.setCnclRtnReqQtyArr(cnclRtnReqQtyArr);
|
|
|
cnclReq.setIpAddress(TsaSession.getIpAddress());
|
|
|
cnclReq.setRegNo(userNo);
|
|
|
|
|
|
// 1. 환불 사전 정보 조회
|
|
|
GagaMap refundPreInfo = orderChangeService.getRefundPreInfo2(cnclReq);
|
|
|
- cnclReqList = (List<Order>) refundPreInfo.get("cnclReqList");
|
|
|
+ List<Order> cnclReqList = (List<Order>) refundPreInfo.get("cnclReqList");
|
|
|
|
|
|
// 2. 환불금액정보 계산 & 조회
|
|
|
mav = orderRefundService.cnclRtnRefundAmt2(cnclReqList);
|