Browse Source

更新

master
gengby 2 years ago
parent
commit
3302c9ba91
  1. 13
      hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java

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

@ -42,6 +42,7 @@ import org.nl.exception.BadRequestException;
import org.nl.logger.BusinessLogger; import org.nl.logger.BusinessLogger;
import org.nl.start.auto.run.NDCSocketConnectionAutoRun; import org.nl.start.auto.run.NDCSocketConnectionAutoRun;
import org.nl.utils.SpringContextHolder; import org.nl.utils.SpringContextHolder;
import org.nl.wql.core.bean.WQLObject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -266,21 +267,29 @@ public class AgvServiceImpl implements AgvService {
String compound_inst_data = inst.getCompound_inst_data(); String compound_inst_data = inst.getCompound_inst_data();
String[] str = null; String[] str = null;
List<String> pathlist = null; List<String> pathlist = null;
WQLObject wo = WQLObject.getWQLObject("acs_device_extra");
if (StrUtil.equals("2", inst.getInstruction_type()) && !StrUtil.isEmpty(compound_inst_data)) { if (StrUtil.equals("2", inst.getInstruction_type()) && !StrUtil.isEmpty(compound_inst_data)) {
str = compound_inst_data.split("->"); str = compound_inst_data.split("->");
pathlist = Arrays.asList(str); pathlist = Arrays.asList(str);
for (int i = 0; i < pathlist.size(); i++) { for (int i = 0; i < pathlist.size(); i++) {
String device_code = pathlist.get(i); String device_code = pathlist.get(i);
Device device = deviceAppService.findDeviceByCode(device_code); Device device = deviceAppService.findDeviceByCode(device_code);
if (ObjectUtil.isEmpty(device)) { if (ObjectUtil.isEmpty(device)) {
throw new BadRequestException("未找到该设备【" + device_code + "】"); throw new BadRequestException("未找到该设备【" + device_code + "】");
} }
String inspect_in_stocck = device.getExtraValue().get("inspect_in_stocck").toString();
if (i == 0) { if (i == 0) {
if (!StrUtil.equals(inspect_in_stocck,"true")){
ja.add(destination(device_code, "Load", "1", "1")); ja.add(destination(device_code, "Load", "1", "1"));
} else {
ja.add(destination(device_code, "OP_PICK", "1", "1"));
}
} else if (i == pathlist.size() - 1) { } else if (i == pathlist.size() - 1) {
if (!StrUtil.equals(inspect_in_stocck,"true")){
ja.add(destination(device_code, "Unload", "1", "1")); ja.add(destination(device_code, "Unload", "1", "1"));
} else {
ja.add(destination(device_code, "OP_DUMP", "1", "1"));
}
} else { } else {
ja.add(destination(device_code, "OP_DUMP", "1", "4")); ja.add(destination(device_code, "OP_DUMP", "1", "4"));
} }

Loading…
Cancel
Save