更新
This commit is contained in:
@@ -42,6 +42,7 @@ import org.nl.exception.BadRequestException;
|
||||
import org.nl.logger.BusinessLogger;
|
||||
import org.nl.start.auto.run.NDCSocketConnectionAutoRun;
|
||||
import org.nl.utils.SpringContextHolder;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -266,21 +267,29 @@ public class AgvServiceImpl implements AgvService {
|
||||
String compound_inst_data = inst.getCompound_inst_data();
|
||||
String[] str = null;
|
||||
List<String> pathlist = null;
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("acs_device_extra");
|
||||
if (StrUtil.equals("2", inst.getInstruction_type()) && !StrUtil.isEmpty(compound_inst_data)) {
|
||||
str = compound_inst_data.split("->");
|
||||
pathlist = Arrays.asList(str);
|
||||
|
||||
for (int i = 0; i < pathlist.size(); i++) {
|
||||
String device_code = pathlist.get(i);
|
||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||
if (ObjectUtil.isEmpty(device)) {
|
||||
throw new BadRequestException("未找到该设备【" + device_code + "】");
|
||||
}
|
||||
String inspect_in_stocck = device.getExtraValue().get("inspect_in_stocck").toString();
|
||||
if (i == 0) {
|
||||
ja.add(destination(device_code, "Load", "1", "1"));
|
||||
if (!StrUtil.equals(inspect_in_stocck,"true")){
|
||||
ja.add(destination(device_code, "Load", "1", "1"));
|
||||
} else {
|
||||
ja.add(destination(device_code, "OP_PICK", "1", "1"));
|
||||
}
|
||||
} else if (i == pathlist.size() - 1) {
|
||||
ja.add(destination(device_code, "Unload", "1", "1"));
|
||||
if (!StrUtil.equals(inspect_in_stocck,"true")){
|
||||
ja.add(destination(device_code, "Unload", "1", "1"));
|
||||
} else {
|
||||
ja.add(destination(device_code, "OP_DUMP", "1", "1"));
|
||||
}
|
||||
} else {
|
||||
ja.add(destination(device_code, "OP_DUMP", "1", "4"));
|
||||
}
|
||||
@@ -571,7 +580,7 @@ public class AgvServiceImpl implements AgvService {
|
||||
if (result.getStatus() == 200) {
|
||||
arr.add(result.body());
|
||||
}
|
||||
} catch (Exception e ){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -876,7 +885,7 @@ public class AgvServiceImpl implements AgvService {
|
||||
yzjaSpecialDeviceDriver.setManua_confirm(0);
|
||||
inst.setExecute_status("1");
|
||||
is_feedback = true;
|
||||
} else if (ObjectUtil.isEmpty(inst.getExecute_status()) || !inst.getExecute_status().equals("1")){
|
||||
} else if (ObjectUtil.isEmpty(inst.getExecute_status()) || !inst.getExecute_status().equals("1")) {
|
||||
yzjaSpecialDeviceDriver.setManua_confirm(1);
|
||||
}
|
||||
} else {
|
||||
@@ -892,7 +901,7 @@ public class AgvServiceImpl implements AgvService {
|
||||
yzjaSpecialDeviceDriver.setManua_confirm(0);
|
||||
inst.setExecute_status("3");
|
||||
is_feedback = true;
|
||||
} else if (ObjectUtil.isEmpty(inst.getExecute_status()) || !inst.getExecute_status().equals("3")){
|
||||
} else if (ObjectUtil.isEmpty(inst.getExecute_status()) || !inst.getExecute_status().equals("3")) {
|
||||
yzjaSpecialDeviceDriver.setManua_confirm(1);
|
||||
}
|
||||
} else {
|
||||
@@ -1106,7 +1115,7 @@ public class AgvServiceImpl implements AgvService {
|
||||
//请求进
|
||||
if (StrUtil.equals(type, "07") && address.endsWith("IQ")) {
|
||||
sandardManipulatorInspectSiteDeviceDriver.writing(1, 7);
|
||||
if ( sandardManipulatorInspectSiteDeviceDriver.getIo_action() == 1
|
||||
if (sandardManipulatorInspectSiteDeviceDriver.getIo_action() == 1
|
||||
|| sandardManipulatorInspectSiteDeviceDriver.getIo_action() == 3) {
|
||||
is_feedback = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user