|
|
@@ -4,12 +4,15 @@ import java.util.Collection;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import com.style24.batch.biz.dao.TsbWmsGoodsDao;
|
|
|
+import com.style24.batch.support.env.TsbConstants;
|
|
|
import com.style24.persistence.domain.GoodsIfIncomelot;
|
|
|
import com.style24.persistence.domain.GoodsIfIncomelotitem;
|
|
|
import com.style24.persistence.domain.GoodsIfMeasurement;
|
|
|
import com.style24.persistence.domain.IfBrand;
|
|
|
+import com.style24.persistence.domain.IfProduct;
|
|
|
import com.style24.persistence.domain.IfProvider;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -27,6 +30,9 @@ public class TsbWmsGoodsService {
|
|
|
@Autowired
|
|
|
private TsbWmsGoodsDao wmsGoodsDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TsbGoodsService goodsService;
|
|
|
+
|
|
|
/**
|
|
|
* WMS 실측사이즈 연용
|
|
|
*
|
|
|
@@ -67,23 +73,75 @@ public class TsbWmsGoodsService {
|
|
|
* @author eskim
|
|
|
* @since 2021. 01. 05
|
|
|
*/
|
|
|
- //@Transactional("wmsTxnManager")
|
|
|
- public void saveWmsProvider(IfProvider ifProvider) {
|
|
|
- wmsGoodsDao.saveWmsProvider(ifProvider);
|
|
|
+ @Transactional("wmsTxnManager")
|
|
|
+ public void saveWmsBrand(IfBrand ifBrand) {
|
|
|
+ //브랜드 정보 송신
|
|
|
+ wmsGoodsDao.saveWmsBrand(ifBrand);
|
|
|
+ //WMS 브랜드업체관계정보 송신
|
|
|
+ wmsGoodsDao.saveWmsBrandProviderXref(ifBrand);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
- * WMS 업체정보 송신
|
|
|
+ * WMS 브랜드/업체정보 송신
|
|
|
*
|
|
|
* @return
|
|
|
* @author eskim
|
|
|
- * @since 2021. 01. 05
|
|
|
+ * @since 2021. 01. 01
|
|
|
*/
|
|
|
- public void saveWmsBrand(IfBrand ifBrand) {
|
|
|
- //브랜드 정보 송신
|
|
|
- wmsGoodsDao.saveWmsBrand(ifBrand);
|
|
|
- //WMS 브랜드업체관계정보 송신
|
|
|
- wmsGoodsDao.saveWmsBrandProviderXref(ifBrand);
|
|
|
+ @Transactional("wmsTxnManager")
|
|
|
+ public void saveWmsBrandProvider() {
|
|
|
+
|
|
|
+ //업체정보 송신(수정일 7일)
|
|
|
+ /*
|
|
|
+ * 매핑 확인건
|
|
|
+ G065_10 자사-제조
|
|
|
+ G065_11 자사-사입
|
|
|
+ G065_12 자사-위탁
|
|
|
+ */
|
|
|
+
|
|
|
+ Collection<IfProvider> ifProviderList = goodsService.getSupplyCompanyList();
|
|
|
+
|
|
|
+ for (IfProvider ifProvider : ifProviderList) {
|
|
|
+ ifProvider.setRegNo(TsbConstants.REG_NO);
|
|
|
+ ifProvider.setUpdNo(TsbConstants.REG_NO);
|
|
|
+ wmsGoodsDao.saveWmsProvider(ifProvider);
|
|
|
+ }
|
|
|
+
|
|
|
+ //브랜드, 브랜드/업체 관계정보 송신
|
|
|
+ Collection<IfBrand> ifBrandList = goodsService.getBrandList();
|
|
|
+
|
|
|
+ for (IfBrand ifBrand : ifBrandList) {
|
|
|
+ ifBrand.setRegNo(TsbConstants.REG_NO);
|
|
|
+ ifBrand.setUpdNo(TsbConstants.REG_NO);
|
|
|
+ //브랜드 정보 송신
|
|
|
+ wmsGoodsDao.saveWmsBrand(ifBrand);
|
|
|
+ //WMS 브랜드업체관계정보 송신
|
|
|
+ wmsGoodsDao.saveWmsBrandProviderXref(ifBrand);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * WMS 상품정보 송신
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ * @author eskim
|
|
|
+ * @since 2021. 01. 06
|
|
|
+ */
|
|
|
+ @Transactional("wmsTxnManager")
|
|
|
+ public void saveGoodsWmsProduct(String jobdate) {
|
|
|
+ //상품 정보 송신
|
|
|
+ Collection<IfProduct> ifGoodsList = goodsService.getGoodsList();
|
|
|
+
|
|
|
+ for (IfProduct ifProduct : ifGoodsList) {
|
|
|
+ ifProduct.setRegNo(TsbConstants.REG_NO);
|
|
|
+ ifProduct.setUpdNo(TsbConstants.REG_NO);
|
|
|
+ //상품 정보 송신
|
|
|
+ wmsGoodsDao.saveWmsProduct(ifProduct);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|