|
@@ -1,5 +1,7 @@
|
|
|
package com.style24.admin.biz.service;
|
|
package com.style24.admin.biz.service;
|
|
|
|
|
|
|
|
|
|
+import java.util.Collection;
|
|
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.env.Environment;
|
|
import org.springframework.core.env.Environment;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -7,8 +9,10 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
import com.gagaframework.web.parameter.GagaMap;
|
|
import com.gagaframework.web.parameter.GagaMap;
|
|
|
import com.style24.core.biz.service.TscOrderChangeService;
|
|
import com.style24.core.biz.service.TscOrderChangeService;
|
|
|
|
|
+import com.style24.core.biz.service.TscWmsService;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.persistence.domain.OrderChange;
|
|
import com.style24.persistence.domain.OrderChange;
|
|
|
|
|
+import com.style24.persistence.domain.WmsDelivery;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
@@ -30,6 +34,9 @@ public class TsaOrderChangeService {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TscOrderChangeService coreOrderChangeService;
|
|
private TscOrderChangeService coreOrderChangeService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private TscWmsService coreWmsService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 반품 TO 교환 처리
|
|
* 반품 TO 교환 처리
|
|
@@ -40,18 +47,34 @@ public class TsaOrderChangeService {
|
|
|
*/
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
@Transactional("shopTxnManager")
|
|
|
public void returnToExchange(OrderChange orderChange) {
|
|
public void returnToExchange(OrderChange orderChange) {
|
|
|
|
|
+ Integer ordChgSq = orderChange.getOrdChgSq();
|
|
|
// 1. 반품 철회 처리
|
|
// 1. 반품 철회 처리
|
|
|
GagaMap map = new GagaMap();
|
|
GagaMap map = new GagaMap();
|
|
|
- map.setInt("ordChgSq", orderChange.getOrdChgSq());
|
|
|
|
|
|
|
+ map.setInt("ordChgSq", ordChgSq);
|
|
|
map.setInt("ordNo", orderChange.getOrdNo());
|
|
map.setInt("ordNo", orderChange.getOrdNo());
|
|
|
|
|
|
|
|
int userNo = orderChange.getUserNo();
|
|
int userNo = orderChange.getUserNo();
|
|
|
|
|
|
|
|
coreOrderChangeService.rtnReqCancel(map, userNo);
|
|
coreOrderChangeService.rtnReqCancel(map, userNo);
|
|
|
|
|
|
|
|
- // 2. 교환 접수 처리
|
|
|
|
|
- orderChange.setWdTargetYn("N");
|
|
|
|
|
|
|
+ // 2. WMS 회수지시 여부 체크 후 회시지시대상여부 컬럼 정보 설정
|
|
|
|
|
+ orderChange.setWdTargetYn("Y");
|
|
|
|
|
+
|
|
|
|
|
+ WmsDelivery wmsDelivery = new WmsDelivery();
|
|
|
|
|
+ wmsDelivery.setOrderExceptionNo(ordChgSq);
|
|
|
|
|
+ Collection<WmsDelivery> list = coreWmsService.getWmsWithdrawRequestInfo(wmsDelivery);
|
|
|
|
|
+
|
|
|
|
|
+ if (list != null && list.size() > 0) {
|
|
|
|
|
+ String ifStat = list.iterator().next().getIfStat();
|
|
|
|
|
+ if (!"0".equals(ifStat)) {
|
|
|
|
|
+ orderChange.setWdTargetYn("N");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 3. WMS 반품 정보 삭제 처리
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
+ // 4. 교환 접수 처리
|
|
|
coreOrderChangeService.exchReq(orderChange);
|
|
coreOrderChangeService.exchReq(orderChange);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|