rev:更新
This commit is contained in:
@@ -179,6 +179,10 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
||||
this.setRequireSucess(false);
|
||||
|
||||
}
|
||||
if (task != last_task){
|
||||
this.execute_log.setResource(this.device_code, this.device_code);
|
||||
this.execute_log.log("设备:" + device_code + ",last_task -> task:" + last_task + "->" + task);
|
||||
}
|
||||
if (error != last_error) {
|
||||
this.execute_log.setResource(this.device_code, this.device_code);
|
||||
this.execute_log.log("设备:" + device_code + ",last_error -> error:" + last_error + "->" + error);
|
||||
@@ -212,7 +216,7 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
||||
}
|
||||
}
|
||||
} catch (Exception var17) {
|
||||
return;
|
||||
this.execute_log.log("设备:" + device_code + Arrays.toString(var17.getStackTrace()));
|
||||
}
|
||||
|
||||
// if (!this.itemProtocol.getIsonline()) {
|
||||
@@ -433,11 +437,16 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
if (type == 1) {
|
||||
itemMap.put(to_command, command);
|
||||
this.execute_log.setResource(this.device_code, device_code);
|
||||
this.execute_log.log("设备:{},下发作业命令:{}", device_code, command);
|
||||
} else if (type == 2) {
|
||||
itemMap.put(to_target, command);
|
||||
|
||||
this.execute_log.setResource(this.device_code, device_code);
|
||||
this.execute_log.log("设备:{},下发作业命令:{}", device_code, command);
|
||||
} else if (type == 3) {
|
||||
itemMap.put(to_task, command);
|
||||
this.execute_log.setResource(this.device_code, device_code);
|
||||
this.execute_log.log("设备:{},下发作业命令:{}", device_code, command);
|
||||
}
|
||||
ReadUtil.write(itemMap, server);
|
||||
|
||||
|
||||
@@ -1100,10 +1100,14 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
//如果此站点为1002,并且指令创建锁是打开的话,则不需要再次创建
|
||||
if (ObjectUtil.isNotEmpty(apply_task) && apply_task.equals("true")
|
||||
&& !scannerDeviceDriver.getCreateLock()) {
|
||||
obj.setRequest_again("1");
|
||||
// obj.setRequest_again("1");
|
||||
}
|
||||
}
|
||||
|
||||
entity.setInstruction_status("2");
|
||||
wo.update(json);
|
||||
removeByCodeFromCache(entity.getInstruction_code());
|
||||
|
||||
// =0 则不用再次请求
|
||||
if (StrUtil.equals(obj.getRequest_again(), "0")) {
|
||||
if (StrUtil.equals(obj.getNext_device_code(), instnextdevice)) {
|
||||
@@ -1115,8 +1119,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
finishAndCreateNextInstJM(entity);
|
||||
}
|
||||
}
|
||||
entity.setInstruction_status("2");
|
||||
wo.update(json);
|
||||
|
||||
|
||||
//将指令条码写入终点设备中去
|
||||
if (ObjectUtil.isNotEmpty(entity.getVehicle_code())) {
|
||||
@@ -1137,7 +1140,6 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
lampThreecolorDeviceDriver.writing(0);
|
||||
}
|
||||
}
|
||||
removeByCodeFromCache(entity.getInstruction_code());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user