diff --git a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndcone/AgvNdcOneDeviceDriver.java index c70f570..94ce6ea 100644 --- a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -317,14 +317,15 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) { removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver(); // 请求进入 - Map map = new HashMap<>(); - map.put("to_command", 1); - try { - removeSealCoverPositionDriver.writing(map); - } catch (Exception e) { - e.printStackTrace(); - } - if (removeSealCoverPositionDriver.getAction() == 1) { + // Map map = new HashMap<>(); + // map.put("to_command", 1); + // try { + // removeSealCoverPositionDriver.writing(map); + // } catch (Exception e) { + // e.printStackTrace(); + // } + //到达取货点1 + if (removeSealCoverPositionDriver.getAction() == 3 && "1".equals(instruction.getHave_lid()) && removeSealCoverPositionDriver.getMode() > 0 ) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) @@ -452,10 +453,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) { removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver(); - // 取货完毕 Map map = new HashMap<>(); - map.put("to_command", 2); + map.put("to_command", 4); try { + // 取货完毕 removeSealCoverPositionDriver.writing(map); data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() @@ -607,15 +608,15 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) { removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver(); - // 请求进入 - Map map = new HashMap<>(); - map.put("to_command", 3); - try { - removeSealCoverPositionDriver.writing(map); - } catch (Exception e) { - e.printStackTrace(); - } - if (removeSealCoverPositionDriver.getAction() == 1) { + // 到达放货点 + // Map map = new HashMap<>(); + // map.put("to_command", 3); + // try { + // removeSealCoverPositionDriver.writing(map); + // } catch (Exception e) { + // e.printStackTrace(); + // } + if (removeSealCoverPositionDriver.getAction() == 1 && "1".equals(instruction.getHave_lid()) && removeSealCoverPositionDriver.getMode() > 0) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) @@ -747,9 +748,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) { removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver(); - // 取货完毕 + // 放货完毕 Map map = new HashMap<>(); - map.put("to_command", 4); + map.put("to_command", 1); try { removeSealCoverPositionDriver.writing(map); data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); @@ -896,16 +897,18 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic } if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) { + // removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver(); + // // 请求进入 + // Map map = new HashMap<>(); + // map.put("to_command", 1); + // try { + // removeSealCoverPositionDriver.writing(map); + // } catch (Exception e) { + // e.printStackTrace(); + // } + //到达取货2 removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver(); - // 请求进入 - Map map = new HashMap<>(); - map.put("to_command", 1); - try { - removeSealCoverPositionDriver.writing(map); - } catch (Exception e) { - e.printStackTrace(); - } - if (removeSealCoverPositionDriver.getAction() == 1) { + if (removeSealCoverPositionDriver.getAction() == 4 && "2".equals(instruction.getHave_lid()) && removeSealCoverPositionDriver.getMode() > 0) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) @@ -1028,9 +1031,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) { removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver(); - // 取货完毕 + // 取货完毕2 Map map = new HashMap<>(); - map.put("to_command", 2); + map.put("to_command", 3); try { removeSealCoverPositionDriver.writing(map); data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); @@ -1178,15 +1181,15 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) { removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver(); - // 请求进入 - Map map = new HashMap<>(); - map.put("to_command", 3); - try { - removeSealCoverPositionDriver.writing(map); - } catch (Exception e) { - e.printStackTrace(); - } - if (removeSealCoverPositionDriver.getAction() == 1) { + // 请求进入 到达放货2 + // Map map = new HashMap<>(); + // map.put("to_command", 3); + // try { + // removeSealCoverPositionDriver.writing(map); + // } catch (Exception e) { + // e.printStackTrace(); + // } + if (removeSealCoverPositionDriver.getAction() == 2 && "2".equals(instruction.getHave_lid()) && removeSealCoverPositionDriver.getMode() > 0) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) @@ -1299,7 +1302,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver(); // 取货完毕 Map map = new HashMap<>(); - map.put("to_command", 4); + map.put("to_command", 2); try { removeSealCoverPositionDriver.writing(map); data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); diff --git a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index c2c9b2f..a3cac33 100644 --- a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -120,6 +120,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { String remark = request.getRemark(); String taskGroupId = request.getTask_group_id(); BigDecimal taskGroupSeq = request.getTask_group_seq(); + JSONObject interaction_json = request.getInteraction_json(); + double oven_time = 0.00d; if (StrUtil.isNotEmpty(request.getOven_time())) { oven_time = Double.parseDouble(request.getOven_time()); diff --git a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/domain/InstructionMybatis.java b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/domain/InstructionMybatis.java index 9f34fac..272a444 100644 --- a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/domain/InstructionMybatis.java +++ b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/domain/InstructionMybatis.java @@ -247,6 +247,8 @@ public class InstructionMybatis extends CommonModel implemen private String task_group_id; private BigDecimal task_group_seq; + private String have_lid; + public void copyFrom(Instruction source) { BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); } diff --git a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/dto/InstructionDto.java b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/dto/InstructionDto.java index 6c31cb2..9029c97 100644 --- a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/dto/InstructionDto.java +++ b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/dto/InstructionDto.java @@ -383,4 +383,6 @@ public class InstructionDto implements Serializable { // private String to_device_code; private String task_group_id; private BigDecimal task_group_seq; + + private String have_lid; } diff --git a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/dto/TaskDto.java b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/dto/TaskDto.java index 80e9c9a..aef16bd 100644 --- a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/dto/TaskDto.java +++ b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/dto/TaskDto.java @@ -373,4 +373,9 @@ public class TaskDto implements Serializable { private String class_type; private String task_group_id; private BigDecimal task_group_seq; + + /** + * 是否有盖子 + */ + private String have_lid; } diff --git a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java index 248e312..61668e0 100644 --- a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java +++ b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java @@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; import org.nl.acs.common.base.CommonFinalParam; @@ -139,6 +140,9 @@ public class AutoCreateInst { String taskGroupId = acsTask.getTask_group_id(); BigDecimal taskGroupSeq = acsTask.getTask_group_seq(); + JSONObject interaction_json = JSONObject.parseObject(acsTask.getInteraction_json()); + + String have_lid = interaction_json == null ? null: interaction_json.getString("have_lid"); if (StrUtil.equals(is_send, "0")) { continue; @@ -220,6 +224,7 @@ public class AutoCreateInst { instdto.setTask_group_id(taskGroupId); instdto.setTask_group_seq(taskGroupSeq); + instdto.setHave_lid(have_lid); instdto.setPriority(priority); instdto.setCarno(carNo);