fix: 前端大屏显示
This commit is contained in:
@@ -537,7 +537,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
jo.put("task_code", ObjectUtil.isEmpty(instruction) ? "0" : instruction.getTask_code());
|
||||
//异常
|
||||
jo.put("fault", this.getError_message());
|
||||
jo.put("message", LangProcess.msg(message));
|
||||
jo.put("message",message);
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
@@ -1516,7 +1516,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
jo.put("task_code", ObjectUtil.isEmpty(instruction) ? "0" : instruction.getTask_code());
|
||||
//异常
|
||||
jo.put("fault", this.getError_message());
|
||||
jo.put("message", LangProcess.msg(message));
|
||||
jo.put("message", message);
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ public class XgagvDeviceDriver extends AbstractOpcDeviceDriver implements Device
|
||||
JSONObject jo = new JSONObject();
|
||||
String mode = "";
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("message", LangProcess.msg(message));
|
||||
jo.put("message", message);
|
||||
jo.put("is_click", true);
|
||||
jo.put("address", address);
|
||||
jo.put("stop", stop);
|
||||
|
||||
@@ -256,7 +256,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
}
|
||||
|
||||
if (move != 0 && task > 0) {
|
||||
CompletableFuture<Void> future = CompletableFuture.runAsync(() -> {
|
||||
CompletableFuture.runAsync(() -> {
|
||||
// 异步更新指令状态
|
||||
try {
|
||||
update_instruction_status();
|
||||
@@ -264,7 +264,6 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
future.thenRun(() -> System.out.println("异步更新任务已完成"));
|
||||
}
|
||||
|
||||
} catch (Exception var17) {
|
||||
|
||||
@@ -851,7 +851,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", this.getError());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", LangProcess.msg(message));
|
||||
jo.put("message", message);
|
||||
jo.put("inst_message", this.inst_message);
|
||||
jo.put("task", this.getTask());
|
||||
jo.put("barcode", plcbarcode);
|
||||
|
||||
@@ -112,10 +112,10 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements Opc
|
||||
}
|
||||
|
||||
if (i > 0) {
|
||||
ThreadUtl.sleep(300L);
|
||||
ThreadUtl.sleep(100L);
|
||||
}
|
||||
|
||||
if (i > 3) {
|
||||
if (i >= 3) {
|
||||
// log.info("写入次数超过3次而失败");
|
||||
throw new RuntimeException("写入次数超过3次而失败");
|
||||
}
|
||||
|
||||
@@ -398,6 +398,12 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
String response = acsToWmsService.applyTowToOne(param);
|
||||
JSONObject jo = JSON.parseObject(response);
|
||||
if (response == null || jo.getInteger("status") == 200) {
|
||||
List list1 = new ArrayList();
|
||||
Map map = new HashMap();
|
||||
map.put("code", "to_command");
|
||||
map.put("value", 25);
|
||||
list1.add(map);
|
||||
this.writing(list1);
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("二楼到一楼输送线申请行架任务,参数,接口返回:" + jo)
|
||||
|
||||
@@ -311,7 +311,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
}
|
||||
|
||||
//子卷入库申请入库任务
|
||||
if (mode == 7 && !requireSucess){
|
||||
if (mode == 7 && move == 1 && !requireSucess){
|
||||
if (StrUtil.isEmpty(barcode)||StrUtil.isEmpty(material_barcode)){
|
||||
message = "universal_notCreateInstMessage8";
|
||||
}
|
||||
|
||||
@@ -259,10 +259,9 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
.build();
|
||||
logDto2.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
String data = jo.getString("data");
|
||||
JSONObject datas = JSON.parseObject(data);
|
||||
packagePLCData(datas);
|
||||
String isUncap = datas.get("isUncap").toString();
|
||||
|
||||
packagePLCData(jo);
|
||||
String isUncap = jo.getString("isUncap");
|
||||
if ("1".equals(isUncap)){
|
||||
List list1 = new ArrayList();
|
||||
Map map = new HashMap();
|
||||
@@ -277,6 +276,8 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
map.put("value", 99);
|
||||
list1.add(map);
|
||||
this.writing(list1);
|
||||
Instruction inst = checkInst();
|
||||
finish_instruction(inst);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -290,10 +291,10 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
}
|
||||
|
||||
private void packagePLCData(JSONObject datas) {
|
||||
String length = datas.get("boxLength").toString();
|
||||
String weight = datas.get("boxWidth").toString();
|
||||
String height = datas.get("boxHigh").toString();
|
||||
String desiccant = datas.get("desiccantTemplat").toString();
|
||||
String length = datas.getString("boxLength");
|
||||
String weight = datas.getString("boxWidth");
|
||||
String height = datas.getString("boxHigh");
|
||||
String desiccant = datas.getString("desiccantTemplat");
|
||||
List list = new ArrayList();
|
||||
Map map4 = new HashMap();
|
||||
map4.put("code", "to_length");
|
||||
@@ -341,6 +342,11 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
return true;
|
||||
}
|
||||
|
||||
public synchronized boolean finish_instruction(Instruction inst) throws Exception {
|
||||
instructionService.finish(inst);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
protected void thingToNothing() throws Exception {
|
||||
requireSucess = false;
|
||||
|
||||
@@ -216,7 +216,11 @@ public class CreateDDJInst {
|
||||
Instruction instdto = new Instruction();
|
||||
if (CollUtil.isEmpty(byDeviceCodes)) {
|
||||
//判断有没有DDJ对接位出入库的指令
|
||||
instructionService.findByCodeAndExcute(next_device_code);
|
||||
List<Instruction> byCodeAndExcute = instructionService.findByCodeAndExcute(next_device_code);
|
||||
if (CollUtil.isNotEmpty(byCodeAndExcute)){
|
||||
((StandardStackerDeviceDriver) deviceByCode.getDeviceDriver()).setNotCreateInstMessage("有DDJ对接位出入库的指令");
|
||||
return;
|
||||
}
|
||||
instdto.setInstruction_type(task_type);
|
||||
instdto.setInstruction_id(IdUtil.simpleUUID());
|
||||
instdto.setRoute_plan_code(route_plan_code);
|
||||
|
||||
Reference in New Issue
Block a user