Просмотр исходного кода

Merge branch 'develop' into jsshin

jsshin 5 лет назад
Родитель
Сommit
e785cda246

+ 4 - 4
src/main/java/com/style24/batch/biz/service/TsbWmsDeliveryService.java

@@ -331,14 +331,14 @@ public class TsbWmsDeliveryService {
 		Delivery dataM = list.iterator().next();	
 
 		dataM.setOrderguid(uuid);
-		Integer delvOrdSeq = dataM.getDeliveryorderno();
-		
+
 		
 		wmsDeliveryDao.insertWmsTbIfDeliveryOrder(dataM);
-		
+		Integer ordPk = dataM.getDeliveryorderno();
+		log.info("ordPk: "+ordPk);
 		for (Delivery data : list) {
 			// TB_IF_DeliveryOrderItem
-			data.setDeliveryorderno(delvOrdSeq);
+			data.setDeliveryorderno(ordPk);
 			wmsDeliveryDao.insertWmsTbIfDeliveryOrderItem(data);
 		}
 	}			

+ 56 - 64
src/main/java/com/style24/batch/biz/task/TsbDeliveryTask.java

@@ -2,26 +2,21 @@ package com.style24.batch.biz.task;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
-import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import com.style24.batch.biz.job.delivery.TsbCjWithdrawInvoiceJob;
+import com.style24.batch.biz.job.delivery.TsbCjWithdrawInvoiceStatJob;
 import com.style24.batch.biz.job.delivery.TsbDailyDeliveryZoneJob;
 import com.style24.batch.biz.job.delivery.TsbDeliveryExcRcvJob;
 import com.style24.batch.biz.job.delivery.TsbDeliveryOrderJob;
 import com.style24.batch.biz.job.delivery.TsbDeliveryOrderRsltJob;
-import com.style24.batch.biz.job.delivery.TsbWithdrawExcRcvJob;
-import com.style24.batch.biz.job.delivery.TsbWithdrawExcRsltJob;
-import com.style24.batch.biz.job.delivery.TsbWithdrawRsltJob;
 import com.style24.batch.biz.job.delivery.TsbInvoiceNoRcvJob;
 import com.style24.batch.biz.job.delivery.TsbShopGoodsStockJob;
-import com.style24.batch.biz.job.delivery.TsbWithdrawRequestJob;
-import com.style24.batch.biz.job.delivery.TsbCjWithdrawInvoiceJob;
-import com.style24.batch.biz.job.delivery.TsbCjWithdrawInvoiceStatJob;
 import com.style24.batch.biz.job.delivery.TsbSweetTrackerJob;
-
-
-
-
+import com.style24.batch.biz.job.delivery.TsbWithdrawExcRcvJob;
+import com.style24.batch.biz.job.delivery.TsbWithdrawExcRsltJob;
+import com.style24.batch.biz.job.delivery.TsbWithdrawRequestJob;
+import com.style24.batch.biz.job.delivery.TsbWithdrawRsltJob;
 
 import lombok.extern.slf4j.Slf4j;
 
@@ -116,132 +111,132 @@ public class TsbDeliveryTask {
 	 * @throws Exception
 	 */
 	//@Scheduled(cron = "${cron.delivery.tsbDeliveryOrderJob}")
-	//@Scheduled(fixedDelay = 3500000)
+	// @Scheduled(fixedDelay = 3500000)
 	@Async
 	public void tsbDeliveryOrderJob() throws Exception {
 		deliveryOrderJob.run("cron.delivery.tsbDeliveryOrderJob");
 	}
 	
 	/**
-	 * 회수예외 수신
+	 * 출고예외 수신
 	 *
 	 * @throws Exception
 	 */
-	//@Scheduled(cron = "${cron.delivery.tsbWithdrawExcRcvJob}")
+	//@Scheduled(cron = "${cron.delivery.tsbDeliveryExcRcvJob}")
 	//@Scheduled(fixedDelay = 3500000)
 	@Async 
-	public void tsbWithdrawExcRcvJob() throws Exception {
-		withdrawExcRcvJob.run("cron.delivery.tsbWithdrawExcRcvJob");
-	}
-	
+	public void tsbDeliveryExcRcvJob() throws Exception {
+		deliveryExcRcvJob.run("cron.delivery.tsbDeliveryExcRcvJob");
+	}	
+		
 	/**
-	 * 회수예외 결과
+	 * wms 송장번호 수신  
 	 *
 	 * @throws Exception
 	 */
-	//@Scheduled(cron = "${cron.delivery.tsbWithdrawExcRsltJob}")
+	//@Scheduled(cron = "${cron.delivery.tsbInvoiceNoRcvJob}")
 	//@Scheduled(fixedDelay = 3500000)
 	@Async 
-	public void tsbWithdrawExcRsltJob() throws Exception {
-		withdrawExcRsltJob.run("cron.delivery.tsbWithdrawExcRsltJob");
+	public void tsbInvoiceNoRcvJob() throws Exception {
+		tsbInvoiceNoRcvJob.run("cron.delivery.tsbInvoiceNoRcvJob");
 	}
 	
 	/**
-	 * 출고예외 수신
+	 * 출고결과 수신
 	 *
 	 * @throws Exception
 	 */
-	//@Scheduled(cron = "${cron.delivery.tsbDeliveryExcRcvJob}")
+	//@Scheduled(cron = "${cron.delivery.tsbDeliveryOrderRsltJob}")
 	//@Scheduled(fixedDelay = 3500000)
 	@Async 
-	public void tsbDeliveryExcRcvJob() throws Exception {
-		deliveryExcRcvJob.run("cron.delivery.tsbDeliveryExcRcvJob");
-	}	
+	public void tsbDeliveryOrderRsltJob() throws Exception {
+		deliveryOrderRsltJob.run("cron.delivery.tsbDeliveryOrderRsltJob");
+	}
 	
 	/**
-	 * 출고결과 수신
+	 * WMS 회수요청
 	 *
 	 * @throws Exception
 	 */
-	//@Scheduled(cron = "${cron.delivery.tsbDeliveryOrderRsltJob}")
+	//@Scheduled(cron = "${cron.delivery.tsbWithdrawRequestJob}")
 	//@Scheduled(fixedDelay = 3500000)
 	@Async 
-	public void tsbDeliveryOrderRsltJob() throws Exception {
-		deliveryOrderRsltJob.run("cron.delivery.tsbDeliveryOrderRsltJob");
-	}
+	public void tsbWithdrawRequestJob() throws Exception {
+		tsbWithdrawRequestJob.run("cron.delivery.tsbWithdrawRequestJob");
+	}	
 	
 	/**
-	 * 회수결과 수신
+	 * CJ 회수송장번호 수신
 	 *
 	 * @throws Exception
 	 */
-	//@Scheduled(cron = "${cron.delivery.tsbWithdrawRsltJob}")
+	//@Scheduled(cron = "${cron.delivery.tsbCjWithdrawInvoiceJob}")
 	//@Scheduled(fixedDelay = 3500000)
 	@Async 
-	public void tsbWithdrawRsltJob() throws Exception {
-		withdrawRsltJob.run("cron.delivery.tsbWithdrawRsltJob");
+	public void tsbCjWithdrawInvoiceJob() throws Exception {
+		tsbCjWithdrawInvoiceJob.run("cron.delivery.tsbCjWithdrawInvoiceJob");
 	}	
-
+	
 	/**
-	 * wms 송장번호 수신  
+	 * CJ 회수상태 수신
 	 *
 	 * @throws Exception
 	 */
-	//@Scheduled(cron = "${cron.delivery.tsbInvoiceNoRcvJob}")
+	//@Scheduled(cron = "${cron.delivery.tsbCjWithdrawInvoiceStatJob}")
 	//@Scheduled(fixedDelay = 3500000)
 	@Async 
-	public void tsbInvoiceNoRcvJob() throws Exception {
-		tsbInvoiceNoRcvJob.run("cron.delivery.tsbInvoiceNoRcvJob");
-	}
-	
+	public void tsbCjWithdrawInvoiceStatJob() throws Exception {
+		tsbCjWithdrawInvoiceStatJob.run("cron.delivery.tsbCjWithdrawInvoiceStatJob");
+	}	
 	
 	/**
-	 * 매장상품재고 수신 
+	 * 회수예외 수신
 	 *
 	 * @throws Exception
 	 */
-	//@Scheduled(cron = "${cron.delivery.tsbShopGoodsStockJob}")
+	//@Scheduled(cron = "${cron.delivery.tsbWithdrawExcRcvJob}")
 	//@Scheduled(fixedDelay = 3500000)
 	@Async 
-	public void tsbShopGoodsStockJob() throws Exception {
-		tsbShopGoodsStockJob.run("cron.delivery.tsbShopGoodsStockJob");
+	public void tsbWithdrawExcRcvJob() throws Exception {
+		withdrawExcRcvJob.run("cron.delivery.tsbWithdrawExcRcvJob");
 	}
 	
 	/**
-	 * WMS 회수요청
+	 * 회수예외 결과
 	 *
 	 * @throws Exception
 	 */
-	//@Scheduled(cron = "${cron.delivery.tsbWithdrawRequestJob}")
+	//@Scheduled(cron = "${cron.delivery.tsbWithdrawExcRsltJob}")
 	//@Scheduled(fixedDelay = 3500000)
 	@Async 
-	public void tsbWithdrawRequestJob() throws Exception {
-		tsbWithdrawRequestJob.run("cron.delivery.tsbWithdrawRequestJob");
-	}	
+	public void tsbWithdrawExcRsltJob() throws Exception {
+		withdrawExcRsltJob.run("cron.delivery.tsbWithdrawExcRsltJob");
+	}
+	
 	
 	/**
-	 * CJ 회수송장번호 수신
+	 * 회수결과 수신
 	 *
 	 * @throws Exception
 	 */
-	//@Scheduled(cron = "${cron.delivery.tsbCjWithdrawInvoiceJob}")
+	//@Scheduled(cron = "${cron.delivery.tsbWithdrawRsltJob}")
 	//@Scheduled(fixedDelay = 3500000)
 	@Async 
-	public void tsbCjWithdrawInvoiceJob() throws Exception {
-		tsbCjWithdrawInvoiceJob.run("cron.delivery.tsbCjWithdrawInvoiceJob");
+	public void tsbWithdrawRsltJob() throws Exception {
+		withdrawRsltJob.run("cron.delivery.tsbWithdrawRsltJob");
 	}	
 	
 	/**
-	 * CJ 회수상태 수신
+	 * 매장상품재고 수신 
 	 *
 	 * @throws Exception
 	 */
-	//@Scheduled(cron = "${cron.delivery.tsbCjWithdrawInvoiceStatJob}")
+	//@Scheduled(cron = "${cron.delivery.tsbShopGoodsStockJob}")
 	//@Scheduled(fixedDelay = 3500000)
 	@Async 
-	public void tsbCjWithdrawInvoiceStatJob() throws Exception {
-		tsbCjWithdrawInvoiceStatJob.run("cron.delivery.tsbCjWithdrawInvoiceStatJob");
-	}	
+	public void tsbShopGoodsStockJob() throws Exception {
+		tsbShopGoodsStockJob.run("cron.delivery.tsbShopGoodsStockJob");
+	}
 	
 	/**
 	 * 스윗트래커  배송 추적 요청
@@ -255,7 +250,4 @@ public class TsbDeliveryTask {
 		tsbSweetTrackerJob.run("cron.delivery.tsbSweetTrackerJob");
 	}	
 	
-	
-	
-	
 }

+ 1 - 1
src/main/java/com/style24/persistence/mybatis/shop/TsbDelivery.xml

@@ -900,7 +900,7 @@
 			, E.RECIP_ZIPCODE                     AS DeliveryPostalCode
 			, E.RECIP_BASE_ADDR                   AS DeliveryAddr1
 			, E.RECIP_DTL_ADDR                    AS DeliveryAddr2
-			, CASE WHEN B.SHOT_DELV_YN ='Y' THEN '13' ELSE '05' END                               AS LogisticsNo
+			, CASE WHEN B.SHOT_DELV_YN ='Y' THEN '14' ELSE '05' END                               AS LogisticsNo
 			, CASE WHEN B.SHOT_DELV_YN ='Y' THEN '디디로직스'  ELSE 'CJ 대한통운' END                  AS LogisticsName
 			, E.DELV_MEMO                         AS DeliveryMemo
 			, CONCAT(F.GOODS_NM,' 외  ', (SELECT COUNT(*) -1 FROM TB_ORDER_DETAIL WHERE ORD_NO = A.ORD_NO) , '건')  AS ProductSummary

+ 2 - 2
src/main/java/com/style24/persistence/mybatis/wms/TsbWmsDelivery.xml

@@ -357,7 +357,7 @@
 	</insert>
 		
 	<!-- 출고요청 M     -->
-	<insert id="insertWmsTbIfDeliveryOrder" parameterType="Delivery" keyProperty="deliveryorderno">
+	<insert id="insertWmsTbIfDeliveryOrder" parameterType="Delivery" useGeneratedKeys="true" keyProperty="deliveryorderno">
 		/*TsbWmsDelivery.insertWmsTbIfDeliveryOrder*/
 		INSERT INTO iSTYLE24_WmsIf.dbo.TB_IF_DeliveryOrder
 		(
@@ -428,7 +428,7 @@
 	</insert>		
 	
 	<!-- 출고요청 D     -->
-	<insert id="insertWmsTbIfDeliveryOrderItem" parameterType="Delivery" keyProperty="deliveryorderitemno" >
+	<insert id="insertWmsTbIfDeliveryOrderItem" parameterType="Delivery" useGeneratedKeys="true" keyProperty="deliveryorderitemno" >
 		/*TsbWmsDelivery.insertWmsTbIfDeliveryOrderItem*/
 		INSERT INTO iSTYLE24_WmsIf.dbo.TB_IF_DeliveryOrderItem
 		(