rev:拍照改异步调用
This commit is contained in:
@@ -27,9 +27,13 @@ import org.nl.wms.warehouse_management.enums.IOSConstant;
|
||||
import org.redisson.api.RLock;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
@@ -50,6 +54,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
@Autowired
|
||||
private RedissonClient redissonClient;
|
||||
|
||||
@Resource
|
||||
@Qualifier("threadPoolExecutor")
|
||||
private ThreadPoolExecutor pool;
|
||||
|
||||
/*
|
||||
* 任务服务
|
||||
*/
|
||||
@@ -185,7 +193,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
SysParamServiceImpl sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class);
|
||||
Param ParamDao = sysParamService.findByCode("is_pat");
|
||||
if (ParamDao.getValue().equals(IOSConstant.IS_DELETE_YES)) {
|
||||
HikvisionSnapshotUtil.sync截图(vehicleDao.getStoragevehicle_code(), taskDao.getTask_code());
|
||||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
HikvisionSnapshotUtil.sync截图(vehicleDao.getStoragevehicle_code(), taskDao.getTask_code());
|
||||
} catch (Exception e) {
|
||||
log.info("调用海康拍照失败:" + e);
|
||||
}
|
||||
}, pool);
|
||||
}
|
||||
|
||||
log.info("ACS向WMS反馈重量,返回参数:--------------------------------------" + BaseResponse.responseOk(resultWeigh).toString());
|
||||
|
||||
Reference in New Issue
Block a user