|
|
|
@ -607,7 +607,7 @@ public class PlcService {
|
|
|
|
Street street = streetService.getStreetByPlcId(plcCmdInfo.getPlcId());
|
|
|
|
Street street = streetService.getStreetByPlcId(plcCmdInfo.getPlcId());
|
|
|
|
Integer type;
|
|
|
|
Integer type;
|
|
|
|
//只进行相机方向判断左边
|
|
|
|
//只进行相机方向判断左边
|
|
|
|
if (plcCmdInfo.getFromDirection() == 1) {
|
|
|
|
if (!(plcCmdInfo.getFromDirection() == 1)){
|
|
|
|
return street.getCamera1Id();
|
|
|
|
return street.getCamera1Id();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return street.getCamera2Id();
|
|
|
|
return street.getCamera2Id();
|
|
|
|
@ -665,9 +665,13 @@ public class PlcService {
|
|
|
|
//托盘码
|
|
|
|
//托盘码
|
|
|
|
String trayCode = null;
|
|
|
|
String trayCode = null;
|
|
|
|
Boolean trayCheck = Boolean.TRUE;
|
|
|
|
Boolean trayCheck = Boolean.TRUE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Boolean trayRFIDCheck = Boolean.TRUE;
|
|
|
|
//如果是用扫码枪 扫 托盘码,就直接扫
|
|
|
|
//如果是用扫码枪 扫 托盘码,就直接扫
|
|
|
|
//if(configProperties.getScanCodeMode().getTray() == 2){
|
|
|
|
//if(configProperties.getScanCodeMode().getTray() == 2){
|
|
|
|
log.info("扫码类型:" + configProperties.getScanCodeMode().getTray());
|
|
|
|
log.info("扫码类型:" + configProperties.getScanCodeMode().getTray());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (plcCmdInfo.getSeparation1() == 1 && configProperties.getScanCodeMode().getTray() == 2) {
|
|
|
|
//托盘使用sick扫码枪
|
|
|
|
//托盘使用sick扫码枪
|
|
|
|
SensorGun sensorGun = sensorService.getSensorByPlc(street.getId(), plcCmdInfo.getLeftRight1());
|
|
|
|
SensorGun sensorGun = sensorService.getSensorByPlc(street.getId(), plcCmdInfo.getLeftRight1());
|
|
|
|
if (sensorGun == null) {
|
|
|
|
if (sensorGun == null) {
|
|
|
|
@ -699,11 +703,13 @@ public class PlcService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (configProperties.getScanCodeMode().getTray() == 3) {
|
|
|
|
// RFID
|
|
|
|
// RFID
|
|
|
|
// RFID rfid = rfidService.getRFIDByPlc(street.getId(),plcCmdInfo.getLeftRight1());
|
|
|
|
// RFID rfid = rfidService.getRFIDByPlc(street.getId(),plcCmdInfo.getLeftRight1());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Boolean trayRFIDCheck = Boolean.FALSE;
|
|
|
|
trayRFIDCheck = Boolean.FALSE;
|
|
|
|
|
|
|
|
|
|
|
|
Set<String> tags = new HashSet<>();
|
|
|
|
Set<String> tags = new HashSet<>();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
@ -739,6 +745,7 @@ public class PlcService {
|
|
|
|
rfidLiveService.rfidSave(plcCmdInfo, String.join(",", tags), street, rfid);
|
|
|
|
rfidLiveService.rfidSave(plcCmdInfo, String.join(",", tags), street, rfid);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
OrderInfo orderInfo = new OrderInfo(street, plcCmdInfo, 1, cmdCode);
|
|
|
|
OrderInfo orderInfo = new OrderInfo(street, plcCmdInfo, 1, cmdCode);
|
|
|
|
Stock stock = stockMapper.getByStreetAndDirectionAndSideAndRowColumn(orderInfo.getStreetId(), plcCmdInfo.getFromDirection(), orderInfo.getSeparation(), orderInfo.getRow(), orderInfo.getColumn());
|
|
|
|
Stock stock = stockMapper.getByStreetAndDirectionAndSideAndRowColumn(orderInfo.getStreetId(), plcCmdInfo.getFromDirection(), orderInfo.getSeparation(), orderInfo.getRow(), orderInfo.getColumn());
|
|
|
|
String scanCode = null;
|
|
|
|
String scanCode = null;
|
|
|
|
|