|
|
|
@ -56,8 +56,9 @@ public class StockCheckRunnable implements Runnable {
|
|
|
|
Stock stock = stockMapper.getByShelveIdAndRowColumn(orderInfo.getShelveId(),orderInfo.getRow(),orderInfo.getColumn());
|
|
|
|
Stock stock = stockMapper.getByShelveIdAndRowColumn(orderInfo.getShelveId(),orderInfo.getRow(),orderInfo.getColumn());
|
|
|
|
String scanCode = null;
|
|
|
|
String scanCode = null;
|
|
|
|
Boolean codeCheck = Boolean.TRUE;
|
|
|
|
Boolean codeCheck = Boolean.TRUE;
|
|
|
|
|
|
|
|
Boolean trayCodeCheck = Boolean.TRUE;
|
|
|
|
//货物使用球机扫码
|
|
|
|
//货物使用球机扫码
|
|
|
|
if(goodsScanCodeMode == 1){
|
|
|
|
if(configProperties.getScanCodeMode().getGoods() == 1){
|
|
|
|
if("".equals(wmsCode)){
|
|
|
|
if("".equals(wmsCode)){
|
|
|
|
//空货物的处理
|
|
|
|
//空货物的处理
|
|
|
|
//如果系统货物为空,则只要扫码识别未出结果,就认为无货物
|
|
|
|
//如果系统货物为空,则只要扫码识别未出结果,就认为无货物
|
|
|
|
@ -80,6 +81,30 @@ public class StockCheckRunnable implements Runnable {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else if(configProperties.getScanCodeMode().getTray() == 1){
|
|
|
|
|
|
|
|
//托盘使用球机扫码
|
|
|
|
|
|
|
|
if("".equals(wmsCode)){
|
|
|
|
|
|
|
|
//空货物的处理
|
|
|
|
|
|
|
|
//如果系统货物为空,则只要扫码识别未出结果,就认为无货物
|
|
|
|
|
|
|
|
trayCode = BarcodeDetector.detectBestCodeUntilOK(configProperties.getSavePath().getMediaPath()+path,configProperties.getScanCodeMode().getTrayCodeTypes());
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(trayCode)|| trayCode.equals("Unrecognized")){
|
|
|
|
|
|
|
|
trayCheck = Boolean.TRUE;
|
|
|
|
|
|
|
|
trayCode = "";
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
trayCheck = wmsCode.equals(trayCode);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
trayCode = BarcodeDetector.detectBestCodeUntilOK(configProperties.getSavePath().getMediaPath()+path,configProperties.getScanCodeMode().getTrayCodeTypes());
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(trayCode)){
|
|
|
|
|
|
|
|
log.error("row:{},cloumn:{}",plcCmdInfo.getRow1(),plcCmdInfo.getColumn1());
|
|
|
|
|
|
|
|
log.error("detectBestBarCode:{}",trayCode);
|
|
|
|
|
|
|
|
trayCode = "识别异常";
|
|
|
|
|
|
|
|
trayCheck = Boolean.FALSE;
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
trayCheck = wmsCode.equals(trayCode);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|