Browse Source

Update AgvServiceImpl.java

master
zhangjiangwei 2 years ago
parent
commit
cee8763a33
  1. 21
      hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java

21
hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java

@ -931,6 +931,7 @@ public class AgvServiceImpl implements AgvService {
if(standardInspectSiteSmartDeviceDriver.getMode()>0
&& ( standardInspectSiteSmartDeviceDriver.getAction() == 3 || standardInspectSiteSmartDeviceDriver.getAction() == 1 )
&& standardInspectSiteSmartDeviceDriver.getError()==0){
standardInspectSiteSmartDeviceDriver.writing(1);
is_feedback = true;
}
//请求放货
@ -938,6 +939,7 @@ public class AgvServiceImpl implements AgvService {
if(standardInspectSiteSmartDeviceDriver.getMode()>0
&& (standardInspectSiteSmartDeviceDriver.getAction() == 3 || standardInspectSiteSmartDeviceDriver.getAction() == 2 )
&& standardInspectSiteSmartDeviceDriver.getError()==0){
standardInspectSiteSmartDeviceDriver.writing(1);
is_feedback = true;
}
}
@ -980,10 +982,13 @@ public class AgvServiceImpl implements AgvService {
}
if (addressdevice.getDeviceDriver() instanceof StandardInspectSiteSmartDeviceDriver) {
standardInspectSiteSmartDeviceDriver = (StandardInspectSiteSmartDeviceDriver) addressdevice.getDeviceDriver();
String apply_task = addressdevice.getExtraValue().get("apply_task").toString();
// String apply_task = addressdevice.getExtraValue().get("apply_task").toString();
//取货完成
if ("Load".equals(action)) {
standardInspectSiteSmartDeviceDriver.setFlag(2);
if (!"1006".equals(address)) {
standardInspectSiteSmartDeviceDriver.writing(2);
}
is_feedback = true;
//如果开启呼叫按钮,那么就需要判断进出动作信号
@ -1008,6 +1013,7 @@ public class AgvServiceImpl implements AgvService {
//放货完成
} else if ("Unload".equals(action)) {
standardInspectSiteSmartDeviceDriver.setFlag(4);
standardInspectSiteSmartDeviceDriver.writing(3);
is_feedback = true;
// if (ObjectUtil.isNotEmpty(apply_task) && apply_task.equals("true")) {
@ -1384,7 +1390,7 @@ public class AgvServiceImpl implements AgvService {
flag = true;
}
if (addressdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
else if (addressdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) addressdevice.getDeviceDriver();
flag = true;
log.info("agvstatus:" + standardInspectSiteDeviceDriver.getFlag() + "");
@ -1404,7 +1410,7 @@ public class AgvServiceImpl implements AgvService {
}
}
if (addressdevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
else if (addressdevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver();
flag = true;
log.info("agvstatus:" + standardOrdinarySiteDeviceDriver.getFlag() + "");
@ -1421,14 +1427,15 @@ public class AgvServiceImpl implements AgvService {
}
}
if (addressdevice.getDeviceDriver() instanceof StandardInspectSiteSmartDeviceDriver) {
else if (addressdevice.getDeviceDriver() instanceof StandardInspectSiteSmartDeviceDriver) {
standardInspectSiteSmartDeviceDriver = (StandardInspectSiteSmartDeviceDriver) addressdevice.getDeviceDriver();
String apply_task = addressdevice.getExtraValue().get("apply_task").toString();
Object o = addressdevice.getExtraValue().get("apply_task");
String apply_task = o == null ? null : o.toString();
//取货完成请求离开
if (standardInspectSiteSmartDeviceDriver.getFlag() == 2) {
//如果开启呼叫按钮,那么就需要判断进出动作信号
if (ObjectUtil.isNotEmpty(apply_task) && apply_task.equals("true")) {
if (ObjectUtil.isNotEmpty(apply_task) && "true".equals(apply_task)) {
if (standardInspectSiteSmartDeviceDriver.getMode() != 0
//&& standardInspectSiteSmartDeviceDriver.getMove() == 0
&& standardInspectSiteSmartDeviceDriver.getAction() == 3
@ -1465,6 +1472,8 @@ public class AgvServiceImpl implements AgvService {
flag = true;
}
}
} else {
flag = true;
}
if (flag) {

Loading…
Cancel
Save