|
@@ -5,16 +5,17 @@ import java.util.Collection;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
+import com.gagaframework.web.parameter.GagaMap;
|
|
|
|
|
+import com.gagaframework.web.util.GagaDateUtil;
|
|
|
import com.style24.batch.biz.job.TsbAbstractJob;
|
|
import com.style24.batch.biz.job.TsbAbstractJob;
|
|
|
import com.style24.batch.biz.service.TsbGoodsService;
|
|
import com.style24.batch.biz.service.TsbGoodsService;
|
|
|
import com.style24.batch.support.env.TsbConstants;
|
|
import com.style24.batch.support.env.TsbConstants;
|
|
|
|
|
+import com.style24.core.biz.service.TscCommonService;
|
|
|
import com.style24.core.biz.service.TscKakaotalkService;
|
|
import com.style24.core.biz.service.TscKakaotalkService;
|
|
|
import com.style24.persistence.domain.ReinboundInform;
|
|
import com.style24.persistence.domain.ReinboundInform;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
-import com.gagaframework.web.parameter.GagaMap;
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 재입고 알림
|
|
* 재입고 알림
|
|
|
*
|
|
*
|
|
@@ -30,6 +31,9 @@ public class TsbGoodsReinboundJob extends TsbAbstractJob<ReinboundInform, Reinbo
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TscKakaotalkService coreKakaotalkService;
|
|
private TscKakaotalkService coreKakaotalkService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private TscCommonService coreCommonService;
|
|
|
|
|
|
|
|
private int succCnt = 0;
|
|
private int succCnt = 0;
|
|
|
private int failCnt = 0;
|
|
private int failCnt = 0;
|
|
@@ -48,10 +52,15 @@ public class TsbGoodsReinboundJob extends TsbAbstractJob<ReinboundInform, Reinbo
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public ReinboundInform write(ReinboundInform reinboundInform) throws Exception {
|
|
public ReinboundInform write(ReinboundInform reinboundInform) throws Exception {
|
|
|
|
|
+ // 2021.12.14 card007 영업일 체크 추가
|
|
|
|
|
+ String bizdayYn = coreCommonService.getBizdayYn(GagaDateUtil.getToday("yyyyMMdd"));
|
|
|
|
|
+ if (!"Y".equals(bizdayYn)) {
|
|
|
|
|
+ return reinboundInform;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
Collection<ReinboundInform> reinboundInformList = goodsService.getReinboundInformList();
|
|
Collection<ReinboundInform> reinboundInformList = goodsService.getReinboundInformList();
|
|
|
if (reinboundInformList == null || reinboundInformList.isEmpty()) {
|
|
if (reinboundInformList == null || reinboundInformList.isEmpty()) {
|
|
|
- return reinboundInform;
|
|
|
|
|
|
|
+ return reinboundInform;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
for (ReinboundInform reinbound : reinboundInformList) {
|
|
for (ReinboundInform reinbound : reinboundInformList) {
|
|
@@ -69,7 +78,7 @@ public class TsbGoodsReinboundJob extends TsbAbstractJob<ReinboundInform, Reinbo
|
|
|
int result = coreKakaotalkService.goodsRestock(goods, TsbConstants.REG_NO);
|
|
int result = coreKakaotalkService.goodsRestock(goods, TsbConstants.REG_NO);
|
|
|
if (result > 0) {
|
|
if (result > 0) {
|
|
|
reinbound.setUpdNo(TsbConstants.REG_NO);
|
|
reinbound.setUpdNo(TsbConstants.REG_NO);
|
|
|
- goodsService.updateReinboundInform(reinbound);
|
|
|
|
|
|
|
+ goodsService.updateReinboundInform(reinbound);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|