|
|
|
|
@ -489,7 +489,6 @@ public class PlcService {
|
|
|
|
|
if(configProperties.getScanCodeMode().getTray() == 2){
|
|
|
|
|
//托盘使用sick扫码枪
|
|
|
|
|
if(configProperties.getSensor().getType() == 1){
|
|
|
|
|
//todo 找到扫码枪地址
|
|
|
|
|
SensorGun sensorGun = sensorService.getSensorByPlc(street.getId(),plcCmdInfo.getLeftRight1());
|
|
|
|
|
if(sensorGun == null){
|
|
|
|
|
trayCode = "识别异常";
|
|
|
|
|
@ -497,6 +496,7 @@ public class PlcService {
|
|
|
|
|
log.error("no sensor gun config in database ,street id:{},direction:{}",street.getId(),plcCmdInfo.getLeftRight1());
|
|
|
|
|
}else {
|
|
|
|
|
trayCode = SickSocket.readOCR(sensorGun.getIp(),sensorGun.getPort());
|
|
|
|
|
log.info("sencor:{}",trayCode);
|
|
|
|
|
if(StringUtils.isEmpty(trayCode) || trayCode.equals("NoRead")){
|
|
|
|
|
trayCode = "识别异常";
|
|
|
|
|
trayCheck = Boolean.FALSE;
|
|
|
|
|
|