opt: 输送线优化和界面优化

This commit is contained in:
yanps
2024-01-26 17:49:35 +08:00
parent 823c961ec6
commit 8966921312
14 changed files with 297 additions and 153 deletions

View File

@@ -39,6 +39,7 @@ import org.nl.acs.task.service.dto.TaskDto;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.system.service.ParamService;
import org.nl.modules.system.service.impl.ParamServiceImpl;
import org.nl.modules.system.util.CodeUtil;
import org.nl.modules.wql.util.SpringContextHolder;
import org.openscada.opc.lib.da.Server;
import org.springframework.beans.factory.annotation.Autowired;
@@ -579,6 +580,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
instdto.setPriority(priority);
instdto.setInstruction_status("0");
instdto.setExecute_device_code(start_point_code);
instdto.setInstruction_code(CodeUtil.getNewCode("INSTRUCT_NO"));
//判断关联的同一列烘箱设备是否都关门 都关门返回false有一个不关门就返回true
boolean isCloseDoor = this.judgeCloseDoor(instdto.getStart_device_code(), instdto.getNext_device_code());
@@ -614,7 +616,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
String start_addr = startDevice.getExtraValue().get("address").toString();
String next_addr = nextDevice.getExtraValue().get("address").toString();
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
+ instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code()
+ instdto.getInstruction_code() +";指令号: "+ CodeUtil.getNewCode("INSTRUCT_NO") + ",指令起点:" + instdto.getStart_device_code()
+ ",指令终点:" + instdto.getNext_device_code());
this.writing("to_onset", start_addr);
this.writing("to_target", next_addr);

View File

@@ -469,16 +469,24 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
applyManipulatorActionRequest.setTask_code1(inst.getTask_code());
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS,参数:" + applyManipulatorActionRequest);
try {
for (int i = 0; i < 5; i++) {
ApplyManipulatorActionResponse response = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest);
if (response == null || response.getstatus() == 200) {
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS,接口返回:" + response.getMessage());
break;
} else {
message = "task变化请求LMS失败: " + response.getMessage();
Thread.sleep(15000);
final ThreadPoolExecutor EXECUTOR = ThreadPoolExecutorUtil.getPoll();
EXECUTOR.submit(() -> {
for (int i = 0; i < 5; i++) {
ApplyManipulatorActionResponse response = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest);
if (response == null || response.getstatus() == 200) {
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS,接口返回:" + response.getMessage());
break;
} else {
logServer.deviceExecuteLog(this.device_code, "", "", "任务变化请求LMS失败:" + response.getMessage());
message = "task变化请求LMS失败: " + response.getMessage();
try {
Thread.sleep(15000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
});
} catch (Exception e) {
e.printStackTrace();
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS失败" + e.getMessage());