|
|
@@ -24,6 +24,7 @@ import com.style24.core.support.env.TscConstants;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.persistence.domain.Brand;
|
|
|
import com.style24.persistence.domain.CommonCode;
|
|
|
+import com.style24.persistence.domain.DeliveryLoc;
|
|
|
import com.style24.persistence.domain.DelvFeePolicy;
|
|
|
import com.style24.persistence.domain.FreeGoods;
|
|
|
import com.style24.persistence.domain.Goods;
|
|
|
@@ -4159,6 +4160,30 @@ public class TssGoodsService {
|
|
|
if (StringUtils.isEmpty(goods.getDelvFeeCd ())) {
|
|
|
throw new IllegalStateException("배송비정책코드를 입력해주세요.");
|
|
|
}
|
|
|
+
|
|
|
+ // 출고처확인 추가 21.11.09
|
|
|
+ Boolean delvLocBool = false;
|
|
|
+ DeliveryLoc delvLoc = new DeliveryLoc();
|
|
|
+ delvLoc.setSupplyCompCd(goods.getSupplyCompCd());
|
|
|
+ Collection<DeliveryLoc> delvLocList = businessService.getDeliveryLocList(delvLoc);
|
|
|
+ if (delvLocList == null || delvLocList.isEmpty()) {
|
|
|
+ // 등록된 출고처 존재유무
|
|
|
+ log.error("####CHK 출고처목록확인 : "+goods);
|
|
|
+ throw new IllegalStateException("출고처가 등록되어있지 않습니다.");
|
|
|
+ }else {
|
|
|
+ // 출고처확인-전달받은 코드가 등록된 출고처 목록에 있는지
|
|
|
+ for (DeliveryLoc loc : delvLocList) {
|
|
|
+ if(goods.getDelvLocCd().equals(loc.getDelvLocCd())) {
|
|
|
+ delvLocBool = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if( !delvLocBool) {
|
|
|
+ log.error("####CHK 출고처확인 : "+goods);
|
|
|
+ throw new IllegalStateException("출고처가 잘못되었습니다. [영업관리 > 공급관리 > 공급업체출고처관리] 에서 등록가능한 출고처코드를 확인해주세요.");
|
|
|
+ }
|
|
|
|
|
|
// 판매수수료율
|
|
|
SupplyCompany supplyCompany = new SupplyCompany();
|