|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
package com.shkj.wms.utils; |
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.shkj.common.constant.RedisConstant; |
|
|
|
|
import com.shkj.common.core.domain.Result; |
|
|
|
|
import com.shkj.wcs.third.stacker.StkCallUtil; |
|
|
|
|
import com.shkj.wms.bo.LocationMoveBo; |
|
|
|
|
@ -13,6 +14,7 @@ import com.shkj.wms.vo.OutStockDetailVo; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.context.annotation.Lazy; |
|
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -30,7 +32,7 @@ public class WmsCallWcsUtil { |
|
|
|
|
private StkCallUtil stkCallUtil; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private IBusinTaskService taskService; |
|
|
|
|
private RedisTemplate redisTemplate; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private ISysThirdExceptionRequestService thirdExceptionRequestService; |
|
|
|
|
@ -52,8 +54,6 @@ public class WmsCallWcsUtil { |
|
|
|
|
* @param call |
|
|
|
|
* @return {@link Result} |
|
|
|
|
*/ |
|
|
|
|
// @Async
|
|
|
|
|
// @Retryable(recover = "outStockRecover", maxAttempts = 3, backoff = @Backoff(value = 2000, multiplier = 2))
|
|
|
|
|
public Result outStock(OutStockDetailVo vo, boolean call,Integer layer) { |
|
|
|
|
try { |
|
|
|
|
STKMoveBo moveBo = getStkMoveBo(vo); |
|
|
|
|
@ -69,7 +69,7 @@ public class WmsCallWcsUtil { |
|
|
|
|
log.info("runTask 结果 = {}", runTask); |
|
|
|
|
return runTask; |
|
|
|
|
} |
|
|
|
|
result = stkCallUtil.outTask(moveBo); |
|
|
|
|
result = stkCallUtil.outTask(moveBo,layer); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
thirdExceptionRequestService.addException(vo.getOrderNo().toString(), ThirdApiTypeEnum.wcsOutTask, JSONObject.toJSONString(moveBo), |
|
|
|
|
@ -90,7 +90,7 @@ public class WmsCallWcsUtil { |
|
|
|
|
moveBo.setLayer(layer); |
|
|
|
|
log.info("callOutStock 调用入参 = {}", moveBo); |
|
|
|
|
//给堆垛机下搬运命令
|
|
|
|
|
Result<Boolean> result = stkCallUtil.outTask(moveBo); |
|
|
|
|
Result<Boolean> result = stkCallUtil.outTask(moveBo,layer); |
|
|
|
|
//记录结果到是否正常,异常要轮询执行
|
|
|
|
|
thirdExceptionRequestService.addException(vo.getOrderNo().toString(), ThirdApiTypeEnum.wcsCallOutStock, JSONObject.toJSONString(moveBo), |
|
|
|
|
JSONObject.toJSONString(result), Result.isOk(result),null,layer); |
|
|
|
|
|