|
|
|
|
@ -205,7 +205,7 @@ public class PlcService {
|
|
|
|
|
if(code.startsWith("C1") || code.startsWith("C3")){
|
|
|
|
|
delay = true;
|
|
|
|
|
}
|
|
|
|
|
path = cameraCapture(cameraId,delay,2000L);
|
|
|
|
|
path = cameraCapture(cameraId,delay,configProperties.getCameraConfig().getDelayCaptureTime());
|
|
|
|
|
}
|
|
|
|
|
//update order info after capture
|
|
|
|
|
if (path != null && needCapture) {
|
|
|
|
|
@ -438,16 +438,16 @@ public class PlcService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void check(PlcCmdInfo plcCmdInfo,String cmdCode,String wmsCode){
|
|
|
|
|
long startTime = System.currentTimeMillis();
|
|
|
|
|
Street street = streetService.getStreetByPlcId(plcCmdInfo.getPlcId());
|
|
|
|
|
Integer cameraId = getCameraByPlcCmd(plcCmdInfo,plcCmdInfo.getLeftRight1());
|
|
|
|
|
gyrateCameraByCode(cameraId, cmdCode);
|
|
|
|
|
String path = cameraCapture(cameraId,true,3000L);
|
|
|
|
|
String path = cameraCapture(cameraId,true,configProperties.getCameraConfig().getDelayCaptureTime());
|
|
|
|
|
OrderInfo orderInfo = new OrderInfo(street,plcCmdInfo,1,cmdCode);
|
|
|
|
|
Stock stock = stockMapper.getByShelveIdAndRowColumn(orderInfo.getShelveId(),orderInfo.getRow(),orderInfo.getColumn());
|
|
|
|
|
|
|
|
|
|
System.out.println(configProperties.getSavePath().getMediaPath()+path);
|
|
|
|
|
log.info("pic path:{}",configProperties.getSavePath().getMediaPath()+path);
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(3500L);
|
|
|
|
|
Thread.sleep(configProperties.getCameraConfig().getDelayScanTime());
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
@ -455,7 +455,7 @@ public class PlcService {
|
|
|
|
|
if(StringUtils.isEmpty(scanCode)){
|
|
|
|
|
scanCode = "识别异常";
|
|
|
|
|
}
|
|
|
|
|
System.out.println(scanCode);
|
|
|
|
|
log.info("code:{}",scanCode);
|
|
|
|
|
//核对正确
|
|
|
|
|
Integer status = 2;
|
|
|
|
|
if(!wmsCode.equals(scanCode)){
|
|
|
|
|
@ -483,6 +483,9 @@ public class PlcService {
|
|
|
|
|
stockMapper.updateById(stock);
|
|
|
|
|
}
|
|
|
|
|
checkLog(stock);
|
|
|
|
|
long end = System.currentTimeMillis();
|
|
|
|
|
long s = end - startTime;
|
|
|
|
|
log.info("time:{}millisecond",s);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|