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