This commit is contained in:
loujf
2022-09-17 14:54:24 +08:00
parent 0adcccf20b
commit 0dac23d40c
7 changed files with 19 additions and 8 deletions

View File

@@ -462,6 +462,7 @@ public class MagicAgvServiceImpl implements MagicAgvService {
inst.setExecute_status("3");
// lnshStationDeviceDriver.setFlag(3);
lnshStationDeviceDriver.writing(6);
lnshStationDeviceDriver.setInst(inst);
is_feedback = true;
}
} else if ("NOP".equals(action)) {
@@ -604,7 +605,6 @@ public class MagicAgvServiceImpl implements MagicAgvService {
if (lnshStationDeviceDriver.getMode() != 0 && lnshStationDeviceDriver.getMove() > 0) {
inst.setExecute_device_code(address);
inst.setExecute_status("4");
lnshStationDeviceDriver.setInst(inst);
is_feedback = true;
}
}
@@ -633,7 +633,7 @@ public class MagicAgvServiceImpl implements MagicAgvService {
is_feedback = true;
}
} else if ("NOP".equals(action)) {
if (lnshLaminatingMachineDeviceDriver.getMode() != 0) {
if (lnshLaminatingMachineDeviceDriver.getMode() != 0 && lnshLaminatingMachineDeviceDriver.getMode() != 6) {
inst.setExecute_device_code(address);
inst.setExecute_status("4");
lnshLaminatingMachineDeviceDriver.writing(1);
@@ -817,8 +817,6 @@ public class MagicAgvServiceImpl implements MagicAgvService {
flag = true;
lnshStationDeviceDriver.writing(3);
// lnshStationDeviceDriver.setFlag(4);
// Instruction inst = instructionService.findByNextCode(address);
// lnshStationDeviceDriver.setInst(inst);
}
// }
}

View File

@@ -134,6 +134,9 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i
logServer.deviceExecuteLog(this.device_code,"","","信号mode" + last_mode + "->" + mode);
}
if (move != last_move) {
if (move == 0) {
this.writing(0);
}
logServer.deviceItemValue(this.device_code,"move" ,String.valueOf(move));
logServer.deviceExecuteLog(this.device_code,"","","信号move" + last_move + "->" + move);
}

View File

@@ -546,7 +546,7 @@ public class JnHandServiceImpl implements JnHandService {
return jo;
}
String task_id = instwo.getString("task_id");
Instruction instdto = (Instruction) JSONObject.toJSON(Instruction.class);
Instruction instdto = (Instruction) instwo.toJavaObject(Instruction.class);
MagicAgvService agvService = SpringContextHolder.getBean(MagicAgvServiceImpl.class);
InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class);
@@ -678,7 +678,7 @@ public class JnHandServiceImpl implements JnHandService {
if (type.equals("2")) {
//手工完成
TaskService taskService = SpringContextHolder.getBean(TaskServiceImpl.class);
TaskDto acsTask = (TaskDto) JSONObject.toJSON(TaskDto.class);
TaskDto acsTask = taskjo.toJavaObject(TaskDto.class);
InstructionService instructionservice = SpringContextHolder.getBean(InstructionServiceImpl.class);
InstructionDto instdto = instructionservice.findByTaskid(acsTask.getTask_id(), "instruction_status <2 ");
if (instdto != null){