压机申请任务判断对接位货物是否为空
This commit is contained in:
@@ -225,9 +225,9 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
String devicecode="BLJ0"+this.device_code.charAt(3);
|
String devicecode="BLJ0"+this.device_code.charAt(3);
|
||||||
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||||
Device nextDevice = appService.findDeviceByCode(devicecode);
|
Device nextDevice = appService.findDeviceByCode(devicecode);
|
||||||
if (nextDevice.getDeviceDriver() instanceof LnshStationDeviceDriver) {
|
if (nextDevice!=null && nextDevice.getDeviceDriver() instanceof LnshStationDeviceDriver) {
|
||||||
LnshStationDeviceDriver driver = (LnshStationDeviceDriver) nextDevice.getDeviceDriver();
|
LnshStationDeviceDriver driver = (LnshStationDeviceDriver) nextDevice.getDeviceDriver();
|
||||||
if(driver.getAction()==1){
|
if(driver.getMove()==1){
|
||||||
log.info("当前压机"+this.device_code+"对应对接位"+driver.device_code+"有货,暂不生成任务");
|
log.info("当前压机"+this.device_code+"对应对接位"+driver.device_code+"有货,暂不生成任务");
|
||||||
}else{
|
}else{
|
||||||
callMaterial();
|
callMaterial();
|
||||||
|
|||||||
Reference in New Issue
Block a user