opt:输送线优化
This commit is contained in:
@@ -234,12 +234,12 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
} else if (device.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||
//到达取货点 入库
|
||||
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) device.getDeviceDriver();
|
||||
if (beltConveyorDeviceDriver.getAction() == 1 && beltConveyorDeviceDriver.getMode() == 2 && beltConveyorDeviceDriver.getError() == 0&& beltConveyorDeviceDriver.getMove() == 1) {
|
||||
if (beltConveyorDeviceDriver.getType() != 2 && beltConveyorDeviceDriver.getAction() == 1 && beltConveyorDeviceDriver.getMode() == 2 && beltConveyorDeviceDriver.getError() == 0&& beltConveyorDeviceDriver.getMove() == 1) {
|
||||
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
} else {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(beltConveyorDeviceDriver.getDevice_code())
|
||||
.content("未给agv进入信号原因是:" + beltConveyorDeviceDriver.getDevice_code() + "动作信号不为1或者工作模式不为2或者有报警,当前的指令号为:" + inst.getInstruction_code())
|
||||
.content("未给agv进入信号原因是:" + beltConveyorDeviceDriver.getDevice_code() + "出入库信号为2或动作信号不为1或者工作模式不为2或者有报警,当前的指令号为:" + inst.getInstruction_code())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
@@ -319,7 +319,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
standardOrdinarySiteDeviceDriver.setInst(inst);
|
||||
} else if (device.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) device.getDeviceDriver();
|
||||
if (beltConveyorDeviceDriver.getAction() == 2 && beltConveyorDeviceDriver.getMode() == 2 && beltConveyorDeviceDriver.getError() == 0) {
|
||||
if (beltConveyorDeviceDriver.getMode() == 2 && beltConveyorDeviceDriver.getError() == 0) {
|
||||
List list1 = new ArrayList();
|
||||
Map map = new HashMap();
|
||||
map.put("code", "to_command");
|
||||
@@ -330,7 +330,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
} else {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(beltConveyorDeviceDriver.getDevice_code())
|
||||
.content("未给agv离开信号原因是:" + beltConveyorDeviceDriver.getDevice_code() + "动作信号不为2或者工作模式不为2或者有报警,当前的指令号为:" + inst.getInstruction_code())
|
||||
.content("未给agv离开信号原因是:" + beltConveyorDeviceDriver.getDevice_code() + "工作模式不为2或者有报警,当前的指令号为:" + inst.getInstruction_code())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
@@ -399,12 +399,12 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
} else if (device.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||
|
||||
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) device.getDeviceDriver();
|
||||
if (beltConveyorDeviceDriver.getAction() == 1 && beltConveyorDeviceDriver.getMode() == 2 && beltConveyorDeviceDriver.getError() == 0&&beltConveyorDeviceDriver.getMove()==0) {
|
||||
if (beltConveyorDeviceDriver.getType() == 2 && beltConveyorDeviceDriver.getAction() == 2 && beltConveyorDeviceDriver.getMode() == 2 && beltConveyorDeviceDriver.getError() == 0&&beltConveyorDeviceDriver.getMove()==0) {
|
||||
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
} else {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(beltConveyorDeviceDriver.getDevice_code())
|
||||
.content("未给agv进入信号原因是:" + beltConveyorDeviceDriver.getDevice_code() + "动作信号不为1或者工作模式不为2或者有报警,当前的指令号为:" + inst.getInstruction_code())
|
||||
.content("未给agv进入信号原因是:" + beltConveyorDeviceDriver.getDevice_code() + "输送线不是出库模式或动作信号不为1或者工作模式不为2或者有报警,当前的指令号为:" + inst.getInstruction_code())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
@@ -496,7 +496,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
} else {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(beltConveyorDeviceDriver.getDevice_code())
|
||||
.content("未给agv离开信号原因是:" + beltConveyorDeviceDriver.getDevice_code() + "动作信号不为2或者工作模式不为2或者有报警,当前的指令号为:" + inst.getInstruction_code())
|
||||
.content("未给agv离开信号原因是:" + beltConveyorDeviceDriver.getDevice_code() + "工作模式不为2或者有报警,当前的指令号为:" + inst.getInstruction_code())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
|
||||
@@ -138,15 +138,16 @@ public class AutoCreateInst {
|
||||
} else {
|
||||
next_point_code = next_device_code;
|
||||
}
|
||||
// BeltConveyorDeviceDriver beltConveyorDeviceDriver;
|
||||
// if (nextdevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||
// beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextdevice.getDeviceDriver();
|
||||
// if (beltConveyorDeviceDriver.getType() != 2) {
|
||||
// beltConveyorDeviceDriver.writing("to_command","7");
|
||||
// log.info("当前输送线出入库信号不为出库");
|
||||
// continue;
|
||||
// }
|
||||
// }
|
||||
|
||||
BeltConveyorDeviceDriver beltConveyorDeviceDriver;
|
||||
if (nextdevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextdevice.getDeviceDriver();
|
||||
if (beltConveyorDeviceDriver.getType() != 2) {
|
||||
beltConveyorDeviceDriver.writing("to_command","7");
|
||||
log.info("当前输送线出入库信号不为出库");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Instruction instdto = new Instruction();
|
||||
@@ -198,9 +199,9 @@ public class AutoCreateInst {
|
||||
try {
|
||||
instructionService.create(instdto);
|
||||
if (nextdevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||
BeltConveyorDeviceDriver beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextdevice.getDeviceDriver();
|
||||
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextdevice.getDeviceDriver();
|
||||
//满足出库,查询当前出库任务,+1后返回给
|
||||
if (beltConveyorDeviceDriver.getAction() == 2 && beltConveyorDeviceDriver.getMode() == 2
|
||||
if (beltConveyorDeviceDriver.getAction() == 2 && beltConveyorDeviceDriver.getMode() == 2
|
||||
&& beltConveyorDeviceDriver.getError() == 0 && beltConveyorDeviceDriver.getMove() == 0) {
|
||||
// 使用同步块确保操作原子性
|
||||
synchronized (beltConveyorDeviceDriver) {
|
||||
|
||||
Reference in New Issue
Block a user