diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java index a28a12359..264cdce3a 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java @@ -74,11 +74,10 @@ public class NDCAgvServiceImpl implements NDCAgvService { } - @Override public void sendAgvInstToNDC(String agv_system_type, Instruction inst) { - log.info("sendAgvInstToNDC 指令下发NDC:" + "inst_code:" + inst.getInstruction_code() + ",agv_system_type:" + agv_system_type + ",agv_inst_type:" + inst.getAgv_inst_type() + - ",priority:" + inst.getPriority() + ",startAddress:" + inst.getStart_point_code() + + log.info("sendAgvInstToNDC 指令下发NDC:" + "inst_code:" + inst.getInstruction_code() + ",agv_system_type:" + agv_system_type + ",agv_inst_type:" + inst.getAgv_inst_type() + + ",priority:" + inst.getPriority() + ",startAddress:" + inst.getStart_point_code() + ",nextAddress:" + inst.getNext_point_code()); if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), "1")) { if (!StrUtil.equals(agv_system_type, "1")) { @@ -104,6 +103,12 @@ public class NDCAgvServiceImpl implements NDCAgvService { byte fhdhigh2 = (byte) IntToHexHigh(nextAddress2); byte fhdlow2 = (byte) IntToHexLow(nextAddress2); byte prioritylow = (byte) IntToHexLow(priority); + byte carnohigh = 0X00; + byte carnolow = 0X00; + if (StrUtil.isNotEmpty(inst.getCarno())) { + carnohigh = (byte) IntToHexHigh(Integer.parseInt(inst.getCarno())); + carnolow = (byte) IntToHexLow(Integer.parseInt(inst.getCarno())); + } String str = "十进制下发:"; String str1 = "十六进制下发:"; @@ -130,10 +135,10 @@ public class NDCAgvServiceImpl implements NDCAgvService { if (type == 1) { b = new byte[]{(byte) 0X87, (byte) 0XCD, (byte) 0X00, (byte) 0X08, - (byte) 0X00, (byte) 0X16, + (byte) 0X00, (byte) 0X18, (byte) 0X00, (byte) 0X01, (byte) 0X00, (byte) 0X71, - (byte) 0X00, (byte) 0X12, + (byte) 0X00, (byte) 0X14, (byte) 0X01, prioritylow, (byte) 0X00, (byte) 0X01, (byte) ikeyhigh, (byte) ikeylow, @@ -141,16 +146,17 @@ public class NDCAgvServiceImpl implements NDCAgvService { (byte) typehigh, (byte) typelow, (byte) qhdhigh, (byte) qhdlow, (byte) qhdhigh2, (byte) qhdlow2, - (byte) fhdhigh, (byte) fhdlow, - (byte) fhdhigh2, (byte) fhdlow2 + (byte) fhdhigh2, (byte) fhdlow2, + (byte) 0X00, (byte) 0X00, + (byte) carnohigh, (byte) carnolow }; } else if (type == 2) { b = new byte[]{(byte) 0X87, (byte) 0XCD, (byte) 0X00, (byte) 0X08, - (byte) 0X00, (byte) 0X16, + (byte) 0X00, (byte) 0X18, (byte) 0X00, (byte) 0X01, (byte) 0X00, (byte) 0X71, - (byte) 0X00, (byte) 0X12, + (byte) 0X00, (byte) 0X14, (byte) 0X01, prioritylow, (byte) 0X00, (byte) 0X01, (byte) ikeyhigh, (byte) ikeylow, @@ -159,7 +165,8 @@ public class NDCAgvServiceImpl implements NDCAgvService { (byte) qhdhigh, (byte) qhdlow, (byte) 0X00, (byte) 0X00, (byte) fhdhigh, (byte) fhdlow, - (byte) 0X00, (byte) 0X00 + (byte) 0X00, (byte) 0X00, + (byte) carnohigh, (byte) carnolow }; } else if (type == 3) { b = new byte[]{(byte) 0X87, (byte) 0XCD, @@ -167,7 +174,7 @@ public class NDCAgvServiceImpl implements NDCAgvService { (byte) 0X00, (byte) 0X16, (byte) 0X00, (byte) 0X01, (byte) 0X00, (byte) 0X71, - (byte) 0X00, (byte) 0X12, + (byte) 0X00, (byte) 0X14, (byte) 0X01, prioritylow, (byte) 0X00, (byte) 0X01, (byte) ikeyhigh, (byte) ikeylow, @@ -337,7 +344,7 @@ public class NDCAgvServiceImpl implements NDCAgvService { } @Override - public byte[] sendAgvTwoModeInst(int phase, int index, int result,int offset,int quantity) { + public byte[] sendAgvTwoModeInst(int phase, int index, int result, int offset, int quantity) { if (phase < 0 || index < 0) return null; byte indexhigh = (byte) IntToHexHigh(index); @@ -364,7 +371,7 @@ public class NDCAgvServiceImpl implements NDCAgvService { log.info("反馈agv动作数据--index:" + hexToString(indexhigh & 0xFF) + hexToString(indexlow & 0xFF) + ",phase:" - + hexToString(phasehigh & 0xFF) + hexToString(phaselow & 0xFF)+",是否侧移: "+(offset == 1?"侧移":"不测移") + ",偏离量: " + quantity); + + hexToString(phasehigh & 0xFF) + hexToString(phaselow & 0xFF) + ",是否侧移: " + (offset == 1 ? "侧移" : "不测移") + ",偏离量: " + quantity); System.out.println("反馈agv动作数据:" + Bytes2HexString(b)); return b; @@ -506,7 +513,6 @@ public class NDCAgvServiceImpl implements NDCAgvService { } - @Override public Map findAllAgvFromCache() { return AGVDeviceStatus; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java index 18f05f941..2d35a9f9f 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java @@ -822,6 +822,7 @@ public class TaskServiceImpl extends CommonServiceImpl impleme //向缓存添加任务信息 this.addTaskToCache(dto); //反馈上位系统任务状态 + entity.setCar_no(dto.getCar_no()); this.feedWmsTaskStatus(entity); @@ -1026,6 +1027,7 @@ public class TaskServiceImpl extends CommonServiceImpl impleme instdto.setStart_height(start_height); instdto.setNext_height(next_height); instdto.setAgv_action_type(acsTask.getAgv_action_type()); + instdto.setCarno(acsTask.getCar_no()); if (StrUtil.equals(agv_system_type, CommonFinalParam.TWO)) { // task_type //1、生箔; Itype=1:取空,取满,放空,放满; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java index 45c0d30ef..85dc4838a 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java @@ -163,6 +163,7 @@ public class AutoCreateInst { instdto.setStart_height(start_height); instdto.setNext_height(next_height); instdto.setAgv_action_type(agvActionType); + instdto.setCarno(acsTask.getCar_no()); //判断agv系统 //1、1楼叉车系统 //2、2楼1区域AGV系统 @@ -176,12 +177,10 @@ public class AutoCreateInst { //5、输送任务 //6、行架 //7、立库 - if (StrUtil.equals(task_type, CommonFinalParam.ONE)) { + if (StrUtil.equals(task_type, CommonFinalParam.ONE) || StrUtil.equals(task_type, "2")) { instdto.setAgv_inst_type(CommonFinalParam.ONE); } else if (StrUtil.equals(task_type, "3")) { instdto.setAgv_inst_type("2"); - } else if (StrUtil.equals(task_type, "2")) { - instdto.setAgv_inst_type("3"); } else if (StrUtil.equals(task_type, "8")) { instdto.setAgv_inst_type("2"); } else { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue index 1172881df..8afc252f9 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue @@ -22,7 +22,7 @@ 指令相关: - +