fix : 满入报警标示修改

This commit is contained in:
ls
2024-12-31 08:30:19 +08:00
parent b82f1cf6ea
commit d8fb4b3873

View File

@@ -103,6 +103,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
private boolean stopReceiveTask = false; private boolean stopReceiveTask = false;
/**
* 异常处理请求标示位
*/
private boolean error_request = false;
/** /**
* 心跳 * 心跳
*/ */
@@ -288,6 +293,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
Boolean requireSucess = false; Boolean requireSucess = false;
/**
* 满入空出成功标记
*/
Boolean errorRequireSucess = false;
/** /**
* 当前指令 * 当前指令
*/ */
@@ -347,6 +357,9 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
clearWrite(); clearWrite();
} }
} }
if (!error.equals(last_error) && error == 0){
errorRequireSucess = false;
}
// 更新指令状态 // 更新指令状态
if (mode == 3 && task > 0 && command == 1 && error == 0) { if (mode == 3 && task > 0 && command == 1 && error == 0) {
@@ -393,7 +406,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
if (mode != 3 || requireSucess) { if (mode != 3 || requireSucess) {
message = "one_message7"; message = "one_message7";
} else { } else {
if (error != 0) { if (error != 0 && !errorRequireSucess) {
erroBlock(); erroBlock();
} }
List list = new ArrayList(); List list = new ArrayList();
@@ -738,7 +751,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
} }
if (type.equals(StandarStirageErroEnum.BLOCK_IN.getType()) || type.equals(StandarStirageErroEnum.FILL.getType())) { if (type.equals(StandarStirageErroEnum.BLOCK_IN.getType()) || type.equals(StandarStirageErroEnum.FILL.getType())) {
updateData2(poinCode, point, split, vehicleCode); // updateData2(poinCode, point, split, vehicleCode);
List list = new ArrayList(); List list = new ArrayList();
String x = point.getExtraValue().get("x").toString(); String x = point.getExtraValue().get("x").toString();
String y = split[1]; String y = split[1];
@@ -759,12 +772,13 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
errorInst = checkInst(); errorInst = checkInst();
} }
} catch (Exception e) { } catch (Exception e) {
this.requireSucess = true; this.errorRequireSucess = false;
e.printStackTrace(); e.printStackTrace();
} }
// this.requireSucess = true; this.errorRequireSucess = true;
} else { } else {
this.errorRequireSucess = false;
LuceneLogDto logDto2 = LuceneLogDto.builder() LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code) .device_code(device_code)
.content("申请更新点位,返回参数:" + jo) .content("申请更新点位,返回参数:" + jo)
@@ -1049,7 +1063,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
List<StackerInstruction> plan = stragety.getPlan(); List<StackerInstruction> plan = stragety.getPlan();
Map<String, List<Instruction>> startDeviceCodes = instructionList.stream().collect(Collectors.groupingBy(Instruction::getStart_device_code)); Map<String, List<Instruction>> startDeviceCodes = instructionList.stream().collect(Collectors.groupingBy(Instruction::getStart_device_code));
Map<String, List<Instruction>> endDeviceCodes = instructionList.stream().collect(Collectors.groupingBy(Instruction::getNext_device_code)); Map<String, List<Instruction>> endDeviceCodes = instructionList.stream().collect(Collectors.groupingBy(Instruction::getNext_device_code));
//初始化队列 //初始化队列
if (CollUtil.isNotEmpty(plan)){ if (CollUtil.isNotEmpty(plan)){
if (tackerInstructionQueue.isEmpty()) { if (tackerInstructionQueue.isEmpty()) {
for (StackerInstruction stackerInstruction : plan) { for (StackerInstruction stackerInstruction : plan) {