|
|
|
|
@ -40,9 +40,14 @@ import cn.iocoder.yudao.module.system.util.RedisUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
import com.google.gson.Gson;
|
|
|
|
|
import de.danielbechler.util.Strings;
|
|
|
|
|
import jakarta.annotation.Resource;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import okhttp3.MediaType;
|
|
|
|
|
import okhttp3.OkHttpClient;
|
|
|
|
|
import okhttp3.Request;
|
|
|
|
|
import okhttp3.Response;
|
|
|
|
|
import org.springframework.http.HttpEntity;
|
|
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
|
|
import org.springframework.http.HttpMethod;
|
|
|
|
|
@ -50,6 +55,7 @@ import org.springframework.http.ResponseEntity;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
@ -377,11 +383,11 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
|
|
|
|
|
orderMapper.updateById(order);
|
|
|
|
|
try {
|
|
|
|
|
if (picCmd.equals("C2")){
|
|
|
|
|
if (picCmd.equals("C2")){
|
|
|
|
|
Thread.sleep(5000);
|
|
|
|
|
}else if (picCmd.equals("C3")){
|
|
|
|
|
Thread.sleep(5000);
|
|
|
|
|
}
|
|
|
|
|
}else if (picCmd.equals("C3")){
|
|
|
|
|
Thread.sleep(5000);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
@ -485,7 +491,7 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
// orderMapper.updateById(order);
|
|
|
|
|
// }
|
|
|
|
|
// //转向原点位
|
|
|
|
|
//// gyrateCameraByCode(camera, "C5");
|
|
|
|
|
//// gyrateCameraByCode(camera, "C5");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
@ -510,19 +516,19 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
List<CheckConfDO> checkConfList = checkConfService.list(new QueryWrapper<CheckConfDO>()
|
|
|
|
|
.ne("check_scan_type", 0)
|
|
|
|
|
.ne("check_scan_type", 0)
|
|
|
|
|
.eq("is_Enable", 1));
|
|
|
|
|
for (CheckConfDO checkConf : checkConfList){
|
|
|
|
|
|
|
|
|
|
redisUtil.hset("stock:task:" + dataInfo.getTaskId(), checkConf.getCheckName(), "");
|
|
|
|
|
}
|
|
|
|
|
// dataInfo = dataInfo.toWMSData();
|
|
|
|
|
|
|
|
|
|
long startTime = System.currentTimeMillis();
|
|
|
|
|
String uuid = UUID.randomUUID().toString();
|
|
|
|
|
StreetDO street = streetService.getStreetByPlcId(dataInfo.getSRMNumber());
|
|
|
|
|
|
|
|
|
|
sseClient.sendMessage(street.getPlcId()+"巷道开始盘点");
|
|
|
|
|
if (street!=null){
|
|
|
|
|
|
|
|
|
|
sseClient.sendMessage(street.getPlcId()+"巷道开始盘点");
|
|
|
|
|
}
|
|
|
|
|
StockDO newStock = BeanUtils.toBean(dataInfo, StockDO.class);
|
|
|
|
|
// 获取记录
|
|
|
|
|
StockDO stock = stockService.getOne(
|
|
|
|
|
@ -579,7 +585,6 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
|
|
|
|
|
// 先记录正常未盘点情况
|
|
|
|
|
stockService.saveOrUpdate(stock);
|
|
|
|
|
redisUtil.hset("stock:task:" + dataInfo.getTaskId(), "taskId", dataInfo.getTaskId());
|
|
|
|
|
checkLog(stock);
|
|
|
|
|
// StockCheckRunnable stockCheckRunnable = new StockCheckRunnable(street,plcCmdInfo,cmdCode,stockMapper,path,checkLogMapper,configProperties.getScanCodeMode().getGoods(),wmsCode,wmsTrayCode,trayCode,trayCheck,configProperties,sensorGun);
|
|
|
|
|
// threadPoolExecutor.execute(stockCheckRunnable);
|
|
|
|
|
@ -709,6 +714,12 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
checkLogMapper.updateStatusByFields(checkLogDO.getId(),codes);
|
|
|
|
|
|
|
|
|
|
checkLogDO = checkLogService.getById(checkLogDO.getId());
|
|
|
|
|
if (checkLogDO != null && checkLogDO.getStatus()!=0){
|
|
|
|
|
resultReport(checkLogDO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
log.error("singleInventoryReturn error", e);
|
|
|
|
|
} finally {
|
|
|
|
|
@ -718,7 +729,172 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
}
|
|
|
|
|
return checkLogDO.getId();
|
|
|
|
|
}
|
|
|
|
|
public void stopCheck(String taskId,Map<String,String> result) {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 将识别结果单独上报给上层系统
|
|
|
|
|
* Request URL:http://[IP]:[Port]/api/resultReport
|
|
|
|
|
* <p>
|
|
|
|
|
* 说明:
|
|
|
|
|
* - shelfCode / pltCode / itemCode / countNumber 的识别值在 extendInfo 中,预期值在 wmsExtendInfo 中(key 为检查项 checkName)
|
|
|
|
|
* - 图片 url:stockDO.checkPic 存的是 uuid,真实 url 在 logistics_url_resources 表中
|
|
|
|
|
*/
|
|
|
|
|
private void resultReport(CheckLogDO checkLogDO) {
|
|
|
|
|
|
|
|
|
|
Map<String, Object> body = new HashMap<>();
|
|
|
|
|
if (checkLogDO == null) {
|
|
|
|
|
log.error("resultReport checkLogDO is null");
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
|
|
// 组装请求体
|
|
|
|
|
body.put("taskId", checkLogDO.getTaskId());
|
|
|
|
|
body.put("tid", checkLogDO.getTid()); // 上层系统 jobid
|
|
|
|
|
body.put("batchNumber", checkLogDO.getBatchNumber());
|
|
|
|
|
|
|
|
|
|
body.put("url", queryPicUrl(checkLogDO.getPic()));
|
|
|
|
|
}
|
|
|
|
|
// 从字典配置读取上层系统地址(key 可按实际配置调整)
|
|
|
|
|
// String host = dictDataService.parseDictData("base_conf", "result_report_ip").getValue();
|
|
|
|
|
// String port =
|
|
|
|
|
String url = dictDataService.parseDictData("base_conf", "cssc_update_result_api").getValue();
|
|
|
|
|
if (url == null) {
|
|
|
|
|
log.error("resultReport url is null");
|
|
|
|
|
}
|
|
|
|
|
List<CheckConfDO> checkConfList = checkConfService.list(new QueryWrapper<CheckConfDO>()
|
|
|
|
|
.ne("check_scan_type", 0)
|
|
|
|
|
.eq("is_Enable", 1));
|
|
|
|
|
|
|
|
|
|
Map<String, String> extendInfo = checkLogDO != null ? checkLogDO.getExtendInfo() : new HashMap<>();
|
|
|
|
|
Map<String, String> wmsExtendInfo =checkLogDO != null ? checkLogDO.getWmsExtendInfo() : new HashMap<>();
|
|
|
|
|
|
|
|
|
|
// // 识别结果(实际扫描值)
|
|
|
|
|
// String shelfCode = extendInfo.get("shelfCode");
|
|
|
|
|
// String pltCode = extendInfo.get("pltCode");
|
|
|
|
|
// String itemCode = extendInfo.get("itemCode");
|
|
|
|
|
// String countNumber = extendInfo.get("countNumber");
|
|
|
|
|
// // 预期值(WMS 下发)
|
|
|
|
|
// String wmsShelfCode = wmsExtendInfo.get("shelfCode");
|
|
|
|
|
// String wmsPltCode = wmsExtendInfo.get("pltCode");
|
|
|
|
|
// String wmsItemCode = wmsExtendInfo.get("itemCode");
|
|
|
|
|
// String wmsCountNumber = wmsExtendInfo.get("countNumber");
|
|
|
|
|
|
|
|
|
|
// body.put("shelfCode", shelfCode);
|
|
|
|
|
// body.put("pltCode", pltCode);
|
|
|
|
|
// body.put("itemCode", itemCode);
|
|
|
|
|
// body.put("countNumber", countNumber);
|
|
|
|
|
// body.put("shelfCodeResult", shelfCode);
|
|
|
|
|
// body.put("pltCodeResult", pltCode);
|
|
|
|
|
// body.put("itemCodeResult", itemCode);
|
|
|
|
|
// body.put("countNumberResult", countNumber);
|
|
|
|
|
for (CheckConfDO checkConfDO : checkConfList) {
|
|
|
|
|
String checkName = checkConfDO.getCheckName();
|
|
|
|
|
body.put(checkName, extendInfo.get(checkName));
|
|
|
|
|
body.put(checkName + "Result", wmsExtendInfo.get(checkName));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 比对结果
|
|
|
|
|
Map<String, Object> inventoryResult = new HashMap<>();
|
|
|
|
|
for (CheckConfDO checkConfDO : checkConfList) {
|
|
|
|
|
inventoryResult.put(checkConfDO.getCheckName(), compare(extendInfo.get(checkConfDO.getCheckName()), wmsExtendInfo.get(checkConfDO.getCheckName())));
|
|
|
|
|
inventoryResult.put(checkConfDO.getCheckName() + "Msg", compareMsg(extendInfo.get(checkConfDO.getCheckName()), wmsExtendInfo.get(checkConfDO.getCheckName())));
|
|
|
|
|
}
|
|
|
|
|
body.put("inventoryResult", inventoryResult);
|
|
|
|
|
|
|
|
|
|
String json = gson.toJson(body);
|
|
|
|
|
okhttp3.RequestBody requestBody = okhttp3.RequestBody.create(json, JSON);
|
|
|
|
|
Request request = new Request.Builder()
|
|
|
|
|
.url(url)
|
|
|
|
|
.post(requestBody)
|
|
|
|
|
.build();
|
|
|
|
|
try (Response response = client.newCall(request).execute()) {
|
|
|
|
|
log.info("resultReport 上报结果 url:{} body:{} response:{}", url, json, response.code());
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
log.error("resultReport 上报异常 url:{} body:{}", url, json, e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static final MediaType JSON = MediaType.get("application/json; charset=utf-8");
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
OkHttpClient client;
|
|
|
|
|
|
|
|
|
|
private final Gson gson = new Gson();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 盘点结束上报给上层系统
|
|
|
|
|
* Request URL:http://[IP]:[Port]/api/inventoryEndReport
|
|
|
|
|
*
|
|
|
|
|
* @param stockDO 盘点状态 DO
|
|
|
|
|
*/
|
|
|
|
|
public void inventoryEndReport(KsecDataInfo stockDO, String type) {
|
|
|
|
|
if (stockDO == null) {
|
|
|
|
|
log.warn("inventoryEndReport stockDO is null");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// 从字典配置读取上层系统地址
|
|
|
|
|
String url = dictDataService.parseDictData("base_conf", "cssc_inventory_end_report_api").getValue();
|
|
|
|
|
if (url == null) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 组装请求体
|
|
|
|
|
Map<String, Object> body = new HashMap<>();
|
|
|
|
|
body.put("taskId", stockDO.getTaskId()); // 任务号
|
|
|
|
|
// 结果类型:盘点
|
|
|
|
|
body.put("cmdName", type);
|
|
|
|
|
|
|
|
|
|
body.put("resultType", "inventory"); // 结果类型:盘点
|
|
|
|
|
// 命令码
|
|
|
|
|
body.put("shelfCode", stockDO.getShelfCode()); // 货架号
|
|
|
|
|
body.put("pltCode", stockDO.getPltCode()); // 托盘条码
|
|
|
|
|
body.put("batchNumber", stockDO.getBatchNumber());// 盘点批次
|
|
|
|
|
|
|
|
|
|
String json = gson.toJson(body);
|
|
|
|
|
okhttp3.RequestBody requestBody = okhttp3.RequestBody.create(json, JSON);
|
|
|
|
|
Request request = new Request.Builder()
|
|
|
|
|
.url(url)
|
|
|
|
|
.post(requestBody)
|
|
|
|
|
.build();
|
|
|
|
|
try (Response response = client.newCall(request).execute()) {
|
|
|
|
|
log.info("inventoryEndReport 上报结果 url:{} body:{} response:{}", url, json, response.code());
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
log.error("inventoryEndReport 上报异常 url:{} body:{}", url, json, e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 通过 uuid 从 logistics_url_resources 表查询图片真实 url
|
|
|
|
|
*/
|
|
|
|
|
private String queryPicUrl(String uuid) {
|
|
|
|
|
if (uuid == null || uuid.isEmpty()) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
List<URLResourcesDo> list = urlResourcesService.list(
|
|
|
|
|
new LambdaQueryWrapper<URLResourcesDo>()
|
|
|
|
|
.eq(URLResourcesDo::getUuid, uuid)
|
|
|
|
|
.orderByAsc(URLResourcesDo::getCreateTime)
|
|
|
|
|
.last("limit 1"));
|
|
|
|
|
return list == null || list.isEmpty() ? "" : list.get(0).getUrl();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 比对两个值是否一致,返回 "true"/"false"
|
|
|
|
|
*/
|
|
|
|
|
private String compare(String actual, String expect) {
|
|
|
|
|
if (actual == null && expect == null) return "true";
|
|
|
|
|
if (actual == null || expect == null) return "false";
|
|
|
|
|
return actual.equals(expect) ? "true" : "false";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 比对失败时的原因文案
|
|
|
|
|
*/
|
|
|
|
|
private String compareMsg(String actual, String expect) {
|
|
|
|
|
if (actual == null && expect == null) return "";
|
|
|
|
|
if (actual == null) return "错误原因:未扫到";
|
|
|
|
|
if (expect == null) return "错误原因:无预期值";
|
|
|
|
|
return actual.equals(expect) ? "" : "错误原因:比对错误";
|
|
|
|
|
}
|
|
|
|
|
public void stopCheck(String taskId,Map<String,String> result) {
|
|
|
|
|
log.info("taskId:{}识别完成", taskId);
|
|
|
|
|
CheckLogDO checkLogDO = checkLogService.getOne(new QueryWrapper<CheckLogDO>()
|
|
|
|
|
.eq("task_id", taskId).last("limit 1")
|
|
|
|
|
@ -731,7 +907,7 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
checkLogDO.setStatus(2);
|
|
|
|
|
checkLogDO.setStatus(2);
|
|
|
|
|
for (String code : result.keySet()) {
|
|
|
|
|
try {
|
|
|
|
|
String wmsType = "wms" + capitalize(code);
|
|
|
|
|
@ -761,7 +937,6 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
sseClient.sendMessage(street.getPlcId()+"巷道结束随行记录");
|
|
|
|
|
// checkLogService.updateById(checkLogDO);
|
|
|
|
|
checkLog(checkLogDO);
|
|
|
|
|
redisUtil.del("stock:task:" + taskId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -816,8 +991,6 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
stockService.updateById(stock);
|
|
|
|
|
checkLog(stock);
|
|
|
|
|
setUpdateResult(resultReport);
|
|
|
|
|
|
|
|
|
|
redisUtil.del("stock:task:" + taskId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static String capitalize(String str) {
|
|
|
|
|
@ -860,8 +1033,8 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
checkLog.setCreateTime(LocalDateTime.now());
|
|
|
|
|
|
|
|
|
|
// if (checkLogDO == null) {
|
|
|
|
|
checkLog.setId(null);
|
|
|
|
|
checkLogMapper.insert(checkLog);
|
|
|
|
|
checkLog.setId(null);
|
|
|
|
|
checkLogMapper.insert(checkLog);
|
|
|
|
|
// }else {
|
|
|
|
|
// checkLogMapper.updateById(checkLog);
|
|
|
|
|
// }
|
|
|
|
|
@ -984,54 +1157,54 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
order.setEndTime(LocalDateTime.now());
|
|
|
|
|
|
|
|
|
|
// 异步执行录像停止、URL 保存及订单更新,避免阻塞 HTTP 请求
|
|
|
|
|
try {
|
|
|
|
|
// 延迟 delayPreset 毫秒后再执行整个异步流程
|
|
|
|
|
try {
|
|
|
|
|
// 延迟 delayPreset 毫秒后再执行整个异步流程
|
|
|
|
|
|
|
|
|
|
Integer delayPreset;
|
|
|
|
|
Map<String,DictDataDO> confMap = dictDataService.getDictDataList("camera_conf");
|
|
|
|
|
if (confMap.containsKey("ptz_return_time")){
|
|
|
|
|
delayPreset = Integer.parseInt(confMap.get("ptz_return_time").getValue());
|
|
|
|
|
} else {
|
|
|
|
|
delayPreset = 2000;
|
|
|
|
|
}
|
|
|
|
|
Integer delayPreset;
|
|
|
|
|
Map<String,DictDataDO> confMap = dictDataService.getDictDataList("camera_conf");
|
|
|
|
|
if (confMap.containsKey("ptz_return_time")){
|
|
|
|
|
delayPreset = Integer.parseInt(confMap.get("ptz_return_time").getValue());
|
|
|
|
|
} else {
|
|
|
|
|
delayPreset = 2000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(delayPreset);
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
}
|
|
|
|
|
List<CameraDO> cameras = streetService.getCameraByDirection(street.getId());
|
|
|
|
|
|
|
|
|
|
orderMapper.updateById(order);
|
|
|
|
|
// 录像停止后,对巷道相机执行「向下 + 两秒后停止 + 转预置点」动作
|
|
|
|
|
if (cameras != null && !cameras.isEmpty()) {
|
|
|
|
|
for (CameraDO cameraDO : cameras) {
|
|
|
|
|
if (cameraDO == null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
CameraModule cameraControlModule = checkLogin(cameraDO.getId());
|
|
|
|
|
if (cameraControlModule == null) {
|
|
|
|
|
log.error("相机登录失败,跳过向下动作,cameraId:{}", cameraDO.getId());
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// 向下开始
|
|
|
|
|
cameraControlModule.ptzControlDownStart(cameraDO.getId(), 0, 0, 1);
|
|
|
|
|
// 两秒后停止
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(2000);
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
Thread.currentThread().interrupt();
|
|
|
|
|
log.error("向下动作等待被中断,cameraId:{}", cameraDO.getId());
|
|
|
|
|
}
|
|
|
|
|
cameraControlModule.ptzControlDownEnd(cameraDO.getId(), 0);
|
|
|
|
|
log.debug("球机控制向下 停止,cameraId:{}", cameraDO.getId());
|
|
|
|
|
// 转到预置点
|
|
|
|
|
gyrateCameraByCode(cameraDO, "inventoryArrived");
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(delayPreset);
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
}
|
|
|
|
|
List<CameraDO> cameras = streetService.getCameraByDirection(street.getId());
|
|
|
|
|
|
|
|
|
|
orderMapper.updateById(order);
|
|
|
|
|
// 录像停止后,对巷道相机执行「向下 + 两秒后停止 + 转预置点」动作
|
|
|
|
|
if (cameras != null && !cameras.isEmpty()) {
|
|
|
|
|
for (CameraDO cameraDO : cameras) {
|
|
|
|
|
if (cameraDO == null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
CameraModule cameraControlModule = checkLogin(cameraDO.getId());
|
|
|
|
|
if (cameraControlModule == null) {
|
|
|
|
|
log.error("相机登录失败,跳过向下动作,cameraId:{}", cameraDO.getId());
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// 向下开始
|
|
|
|
|
cameraControlModule.ptzControlDownStart(cameraDO.getId(), 0, 0, 1);
|
|
|
|
|
// 两秒后停止
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(2000);
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
Thread.currentThread().interrupt();
|
|
|
|
|
log.error("向下动作等待被中断,cameraId:{}", cameraDO.getId());
|
|
|
|
|
}
|
|
|
|
|
cameraControlModule.ptzControlDownEnd(cameraDO.getId(), 0);
|
|
|
|
|
log.debug("球机控制向下 停止,cameraId:{}", cameraDO.getId());
|
|
|
|
|
// 转到预置点
|
|
|
|
|
gyrateCameraByCode(cameraDO, "inventoryArrived");
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("异步停止录像失败, taskId:{}", taskId, e);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("异步停止录像失败, taskId:{}", taskId, e);
|
|
|
|
|
}
|
|
|
|
|
return order;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1216,7 +1389,7 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
|
|
|
|
|
public CameraDO getCameraByLeftRight(StreetDO street, Integer leftRight,Integer workstation) {
|
|
|
|
|
|
|
|
|
|
CameraDO cameraDO = null;
|
|
|
|
|
CameraDO cameraDO = null;
|
|
|
|
|
// 判断对拍
|
|
|
|
|
//获取配置信息
|
|
|
|
|
//码位为库 货架号 层 列
|
|
|
|
|
@ -1225,7 +1398,7 @@ public class PLCServiceImpl implements PLCService {
|
|
|
|
|
cameraDO = streetService.getCameraByDirection(street.getId(),leftRight==1?2:1,workstation);
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
cameraDO = streetService.getCameraByDirection(street.getId(),leftRight,workstation);
|
|
|
|
|
cameraDO = streetService.getCameraByDirection(street.getId(),leftRight,workstation);
|
|
|
|
|
}
|
|
|
|
|
return cameraDO;
|
|
|
|
|
}
|
|
|
|
|
|